public void InitEnemyProfile(EnemyProfile _profile) { hp = _profile.hp; agent.acceleration = _profile.speed; attackRange = _profile.attackRange; warningRange = _profile.warningRange; baseWeapon = _profile.basicWeapon; }
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); } }