player movement
This commit is contained in:
parent
01a1278465
commit
46d2b7bc95
18 changed files with 1415 additions and 34 deletions
34
Assets/Scripts/PlayerEntity.cs
Normal file
34
Assets/Scripts/PlayerEntity.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerEntity : Entity
|
||||
{
|
||||
public bool hasMoved = false;
|
||||
public bool hasAttacked = false;
|
||||
private List<TileObject> moveableTiles = new();
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void SkipTurn()
|
||||
{
|
||||
hasMoved = true;
|
||||
hasAttacked = true;
|
||||
TurnHandler.instance.UpdateTurns();
|
||||
}
|
||||
private void OnMouseDown()
|
||||
{
|
||||
if (!hasMoved && !PlayerEntityMovement.instance.isMoving)
|
||||
{
|
||||
PlayerEntityMovement.instance.SelectEntity(this);
|
||||
SkipTurn();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue