Skip to content

Commit

Permalink
Final dump Pog
Browse files Browse the repository at this point in the history
  • Loading branch information
rudderbucky committed Jun 22, 2020
1 parent 3aa73d7 commit f3198b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Assets/Scripts/Abilities/Ability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,11 @@ IEnumerator Blinker(Transform indicator, GameObject glowPrefab)
{
while(blinking)
{
var color = indicator.GetComponent<SpriteRenderer>().color == Color.cyan ? originalIndicatorColor : Color.cyan;
color.a = (Core.invisible ? (Core.faction == 0 ? 0.2f: 0f) : 1f);
indicator.GetComponent<SpriteRenderer>().color = color;
if(glowPrefab) glowPrefab.SetActive(!glowPrefab.activeSelf);
var newColor = glowPrefab.GetComponent<SpriteRenderer>().color;
newColor.a = (Core.invisible ? (Core.faction == 0 ? 0.1f: 0f) : 0.5f);
glowPrefab.GetComponent<SpriteRenderer>().color = newColor;

yield return new WaitForSeconds(0.125F);
}
var resetColor = originalIndicatorColor;
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Abilities/MissileScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void SetTarget(Transform target)

// Update is called once per frame
void FixedUpdate () {
if(target)
if(target && (!target.GetComponent<Entity>() || !target.GetComponent<Entity>().invisible))
{
var moveVector = (target.position - transform.position).normalized;
GetComponent<Rigidbody2D>().AddForce(120 * moveVector);
Expand Down

0 comments on commit f3198b0

Please sign in to comment.