Iron golem
This commit is contained in:
parent
d3101b6bcf
commit
c74ebe3225
47 changed files with 1914 additions and 6 deletions
|
@ -22,6 +22,8 @@ public class AttackHandler : MonoBehaviour
|
|||
|
||||
void Start()
|
||||
{
|
||||
print("coldown");
|
||||
print(cooldown);
|
||||
InvokeRepeating(nameof(Attack), Random.Range(-cooldown*0.2f, cooldown*0.2f), cooldown);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@ public class AttackSkeleton : AttackHandler
|
|||
|
||||
public override bool Attack()
|
||||
{
|
||||
// If no target (target is dead an destroyed)
|
||||
if (!_minecraftUnit.MovementHandler.TargetUnit) _minecraftUnit.MovementHandler.UpdateNearest();
|
||||
float launchAngle = findLaunchAngle();
|
||||
//print(launchAngle);
|
||||
// If target not reachable
|
||||
|
@ -49,7 +51,6 @@ public class AttackSkeleton : AttackHandler
|
|||
// directShot is the smallest angle, undirectShot shot is the biggest angle
|
||||
float numerator = directShot ? v_sqr - Mathf.Sqrt(inside_sqrt_root) : v_sqr + Mathf.Sqrt(inside_sqrt_root);
|
||||
float inside_arctan = numerator / (g * x);
|
||||
print(inside_arctan);
|
||||
return Mathf.Atan(inside_arctan);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ public static class GlobalsVariable
|
|||
{
|
||||
public static List<AbstractUnit> AliveUnitsTeamA = new List<AbstractUnit>();
|
||||
public static List<AbstractUnit> AliveUnitsTeamB = new List<AbstractUnit>();
|
||||
|
||||
public static AbstractUnit QueenA;
|
||||
public static AbstractUnit QueenB;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue