add all mechanics
This commit is contained in:
parent
87383d5b8c
commit
0e2a7cc7c3
434 changed files with 238349 additions and 2092 deletions
|
|
@ -13,6 +13,7 @@ public class EnemyAbility : Ability
|
|||
|
||||
public override bool TryAbility()
|
||||
{
|
||||
WaveManager.instance.audioSource.PlayOneShot(abilitySound, volume);
|
||||
if (willLookAtPlayer)
|
||||
{
|
||||
direction = WaveManager.instance.GetRandomPlayerPoint();
|
||||
|
|
@ -20,9 +21,13 @@ public class EnemyAbility : Ability
|
|||
}
|
||||
return base.TryAbility();
|
||||
}
|
||||
public void ShootProjectile(Projectile projectile, Vector3 location, float speed, bool aimed)
|
||||
public void ShootProjectile(Projectile projectile, Vector3 location, float speed, bool aimed, Transform bulletParent = null)
|
||||
{
|
||||
Projectile newProjectile = Instantiate(projectile, origin.position, Quaternion.identity);
|
||||
if (bulletParent)
|
||||
{
|
||||
newProjectile.transform.SetParent(bulletParent);
|
||||
}
|
||||
Vector3 projectileDirection = location;
|
||||
if (aimed)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue