Add Advanced and Elite Enemy prefabs; adjust attributes and implement projectile behavior
This commit is contained in:
@@ -19,6 +19,11 @@ namespace Systems
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!target)
|
||||
{
|
||||
AquirePlayerTarget();
|
||||
}
|
||||
|
||||
if (!target || weapons.Count == 0) return;
|
||||
|
||||
foreach (var weapon in weapons)
|
||||
@@ -26,5 +31,11 @@ namespace Systems
|
||||
weapon.Target = target.position;
|
||||
}
|
||||
}
|
||||
|
||||
private void AquirePlayerTarget()
|
||||
{
|
||||
var player = GameManager.Instance.Player;
|
||||
target = player ? player.transform : null;
|
||||
}
|
||||
}
|
||||
}
|
@@ -37,7 +37,7 @@ namespace Systems
|
||||
if (Instance == null)
|
||||
{
|
||||
Instance = this;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
// DontDestroyOnLoad(gameObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user