Commit afe91c81 authored by 18신대성's avatar 18신대성

Player와 Wall이 상태 정보를 가지게 만듬

parent dbbd1473
......@@ -8,6 +8,19 @@ public class Wall : MonoBehaviour
/// Position of this floor at the map.
/// </summary>
public Vector2 mapPos;
public Vector2Int ldPos // left down pos
{
get { return new Vector2Int((int)mapPos.x, (int)mapPos.y); }
}
public Vector2Int rdPos // right down pos
{
get { return ldPos + (dir ? new Vector2Int(1, 0) : new Vector2Int(0, 1)); }
}
public bool dir // false: ver, true: hor
{
get { return (int)(transform.rotation.eulerAngles.y / 90) % 2 != 1; }
}
public int len = 1; // length of wall
public void SetmapPos(Vector2 pos)
{
......
......@@ -5,6 +5,11 @@ using UnityEngine.AI;
public class Player : MonoBehaviour
{
public Vector2Int pos
{
get { return new Vector2Int((int)transform.position.x, (int)transform.position.y); }
}
Coroutine playerArrivalCheck;
public IEnumerator SetCurrentPlayer()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment