예제 #1
0
    protected override void OnCantMove <T> (T component)
    {
        if (component.gameObject.CompareTag("Player2"))
        {
            Player2 hitPlayer2 = component as Player2;
            hitPlayer2.LoseFood(playerDamage);
            Debug.Log(component);
        }

        else if (component.CompareTag("Team2"))
        {
            Team_P2 hitTeam2 = component as Team_P2;
            hitTeam2.LoseHealth(playerDamage);
            Debug.Log(component);
        }

        animator.SetTrigger("enemyAttack");

        SoundManager.instance.RandomizeSfx(enemyAttack1, enemyAttack2);
    }
예제 #2
0
 public void AddEnemy2ToList(Team_P2 script)
 {
     team2.Add(script);
 }