protected void AddActions() { EnnemyActions = gameObject.AddComponent <EnnemyActions>(); EnnemyActions.fireBulletGenerator = fireBulletGenerator; EnnemyActions.Ennemy = Ennemy; EnnemyActions.DeadBody = DeadBody; }
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); } }
void GetEnnemyActions() { EnnemyActions = gameObject.GetComponent <EnnemyActions>(); }