Esempio n. 1
0
 virtual protected void Awake()
 {
     manager = GameObject.Find("EnemyManager").GetComponent <EnemyManager>();
     manager.Enemies.Add(this);
     move   = GetComponent <BaseEnemyMove>();
     attack = GetComponent <BaseEnemyAttack>();
     Stop   = StopStatus.None;
     HP     = hpLiset[GameManager.SelectLevel];
     Score *= 1 << GameManager.SelectLevel;
 }
Esempio n. 2
0
 void Start()
 {
     //make sure you tag the player with "Player"
     mTarget                 = GameObject.FindGameObjectWithTag("Player").transform; //Find the Player and sets my Target Transform.
     AiAttacks               = gameObject.GetComponent <BaseEnemyAttack>();
     Ani                     = gameObject.GetComponent <Animator>();
     mState                  = AIStates.Idle;
     Collider                = GetComponent <BoxCollider2D>();
     EventManager.OnPause   += Pause;
     EventManager.OnUnpause += Unpause;
 }