예제 #1
0
    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));
    }
예제 #2
0
    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;
        }
    }
예제 #3
0
 protected override void Awake()
 {
     base.Awake();
     waypoint = GetComponent <FollowWayPoints>();
 }
예제 #4
0
 protected override void Awake()
 {
     base.Awake();
     waypoint = GetComponent<FollowWayPoints>();
 }