Exemplo n.º 1
0
 public void InitEnemyProfile(EnemyProfile _profile)
 {
     hp = _profile.hp;
     agent.acceleration = _profile.speed;
     attackRange        = _profile.attackRange;
     warningRange       = _profile.warningRange;
     baseWeapon         = _profile.basicWeapon;
 }
Exemplo n.º 2
0
 protected void AttackPlayer(EnemyWeaponData _weapon = null)
 {
     if (_weapon != null)
     {
         playerTarget.TakeDamage(_weapon.damage);
         Debug.Log("Enemy Attacking With " + _weapon.name);
     }
     else
     {
         playerTarget.TakeDamage(baseWeapon.damage);
         Debug.Log("Enemy Attacking With " + baseWeapon.name);
     }
 }