next level logic
This commit is contained in:
parent
ee2a5fdf08
commit
37bed1fd33
16 changed files with 130 additions and 38 deletions
|
@ -11,7 +11,18 @@ public class AttackProjectile : AttackHandler
|
|||
public override bool Attack()
|
||||
{
|
||||
// If no target (target is dead an destroyed)
|
||||
if (!_minecraftUnit.MovementHandler.TargetUnit) _minecraftUnit.MovementHandler.UpdateNearest();
|
||||
if (!_minecraftUnit.MovementHandler.TargetUnit)
|
||||
{
|
||||
if (_minecraftUnit.IsTeamA)
|
||||
{
|
||||
if (GlobalsVariable.AliveUnitsTeamB.Count == 0) return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GlobalsVariable.AliveUnitsTeamA.Count == 0) return false;
|
||||
}
|
||||
_minecraftUnit.MovementHandler.UpdateNearest();
|
||||
}
|
||||
float launchAngle = findLaunchAngle();
|
||||
//print(launchAngle);
|
||||
// If target not reachable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue