Ejemplo n.º 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));
    }
Ejemplo n.º 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;
        }
    }
Ejemplo n.º 3
0
 protected override void Awake()
 {
     base.Awake();
     waypoint = GetComponent <FollowWayPoints>();
 }
Ejemplo n.º 4
0
 protected override void Awake()
 {
     base.Awake();
     waypoint = GetComponent<FollowWayPoints>();
 }