protected override void Dead() { base.Dead(); if (lastEnemy) { print("WaveOver"); GameObject.Find("Start Wave").GetComponent <SpawnWave>().UpdateWaveState(false); } FollowWayPoints wayPoint = GetComponent <FollowWayPoints>(); string animToPlay = ""; int dir = (int)wayPoint.GetRotation; if (dir == 1) { animToPlay = "DieUpView"; } else if (dir == 2 || dir == 4) { animToPlay = "DieSideView"; } else if (dir == 3) { animToPlay = "DieDownView"; } anim.Play(animToPlay); StartCoroutine(WaitForAnimation(animToPlay)); }
protected override void Effect(Collider2D target) { base.Effect(target); FollowWayPoints movement = target.GetComponent <FollowWayPoints>(); if (!movement.GetRandomSpeed) { target.GetComponent <Health>().RestoreHealth(heal); movement.SetMoveSpeedMultiply = speedMultiply; } }
protected override void Awake() { base.Awake(); waypoint = GetComponent <FollowWayPoints>(); }
protected override void Awake() { base.Awake(); waypoint = GetComponent<FollowWayPoints>(); }