they do not call me the ui designer
This commit is contained in:
parent
daf3218043
commit
68af10bc4d
14 changed files with 1677 additions and 125 deletions
|
|
@ -3,9 +3,9 @@ using UnityEngine;
|
|||
|
||||
public class PlayerEntity : Entity
|
||||
{
|
||||
[Header("Player Flags")]
|
||||
public bool hasMoved = false;
|
||||
public bool hasAttacked = false;
|
||||
[Header("Player Flags")]
|
||||
public int actions = 2;
|
||||
public int maxActions = 2;
|
||||
[Header("Weaponry")]
|
||||
[SerializeField] private Weapon[] weapons;
|
||||
[HideInInspector] public List<Weapon> weaponInstances = new();
|
||||
|
|
@ -42,8 +42,7 @@ public class PlayerEntity : Entity
|
|||
|
||||
public void SkipTurn()
|
||||
{
|
||||
hasMoved = true;
|
||||
hasAttacked = true;
|
||||
actions = 0;
|
||||
TurnHandler.instance.UpdateTurns();
|
||||
}
|
||||
public void Attack()
|
||||
|
|
@ -68,7 +67,7 @@ public class PlayerEntity : Entity
|
|||
|
||||
private void OnMouseDown()
|
||||
{
|
||||
if ((!hasMoved || !hasAttacked) && !PlayerEntityMovement.instance.isMoving)
|
||||
if (actions > 0 && !PlayerEntityMovement.instance.isMoving)
|
||||
{
|
||||
ActionUIHandler.instance.ShowUI(this);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue