Пример #1
0
 protected void AddActions()
 {
     EnnemyActions = gameObject.AddComponent <EnnemyActions>();
     EnnemyActions.fireBulletGenerator = fireBulletGenerator;
     EnnemyActions.Ennemy   = Ennemy;
     EnnemyActions.DeadBody = DeadBody;
 }
Пример #2
0
    protected void ApplyDamage(GameObject go)
    {
        if (go.tag == Tag.Player)
        {
            PlayerActions actions = go.GetComponent <PlayerActions>();
            actions.ApplyDamage(Weapon);
        }

        if (go.tag == Tag.Ennemy)
        {
            EnnemyActions actions = go.GetComponent <EnnemyActions>();
            actions.ApplyDamage(Weapon);
        }

        if (go.tag == Tag.Boss)
        {
            EnnemyActions actions = go.GetComponent <EnnemyActions>();
            actions.ApplyDamage(Weapon);
        }
    }
Пример #3
0
 void GetEnnemyActions()
 {
     EnnemyActions = gameObject.GetComponent <EnnemyActions>();
 }