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
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
public class PlayerEntityMovement : MonoBehaviour
|
||||
{
|
||||
|
|
@ -66,7 +67,14 @@ public class PlayerEntityMovement : MonoBehaviour
|
|||
requestedTile = newTile;
|
||||
foreach (TileObject tile in pathRequested)
|
||||
{
|
||||
tile.sprite.color = new Color(137, 137, 137, 255);
|
||||
if (!currentMovableTiles.Contains(tile))
|
||||
{
|
||||
tile.sprite.color = new Color32(137, 137, 137, 255);
|
||||
}
|
||||
else
|
||||
{
|
||||
tile.sprite.color = Color.green;
|
||||
}
|
||||
}
|
||||
PathfindToTarget();
|
||||
}
|
||||
|
|
@ -159,14 +167,7 @@ public class PlayerEntityMovement : MonoBehaviour
|
|||
StartCoroutine(selectedEntity.MoveToLocation(pathRequested.ToArray()));
|
||||
templateObject.SetActive(false);
|
||||
UncolorGrid();
|
||||
if (!selectedEntity.hasMoved)
|
||||
{
|
||||
selectedEntity.hasMoved = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
selectedEntity.hasAttacked = true;
|
||||
}
|
||||
selectedEntity.actions--;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue