Walls + Start Arrow
This commit is contained in:
parent
7da33be977
commit
33467f6cc4
71 changed files with 4255 additions and 81 deletions
|
@ -11,36 +11,18 @@ public class MinecraftUnit : AbstractUnit
|
|||
[field: SerializeField] public AttackHandler AttackHandler { get; private set; }
|
||||
[field: SerializeField] public MovementHandler MovementHandler { get; private set; }
|
||||
|
||||
|
||||
|
||||
|
||||
void OnValidate()
|
||||
{
|
||||
Debug.Assert(Body != null);
|
||||
Debug.Assert(Body != null);
|
||||
Debug.Assert(HealthHandler != null);
|
||||
Debug.Assert(AttackHandler != null);
|
||||
Debug.Assert(MovementHandler != null);
|
||||
}
|
||||
|
||||
void Awake()
|
||||
{
|
||||
|
||||
if (IsTeamA)
|
||||
{
|
||||
GlobalsVariable.AliveUnitsTeamA.Add(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalsVariable.AliveUnitsTeamB.Add(this);
|
||||
}
|
||||
}
|
||||
|
||||
// Abstract implementation for compatibility with other team
|
||||
|
||||
public override bool Attack()
|
||||
{
|
||||
return AttackHandler.Attack();
|
||||
}
|
||||
|
||||
public override void TakeDamage(float damage)
|
||||
{
|
||||
HealthHandler.TakeDamage(damage);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue