39 lines
804 B
C#
Raw Normal View History

2026-01-21 20:27:45 +05:30
using UnityEngine;
2026-01-23 12:46:59 +05:30
using System.Collections.Generic;
[System.Serializable]
public class PlayerPlacementData
{
public PlayerPawn pawn;
}
2026-01-21 20:27:45 +05:30
[System.Serializable]
public class PlayerTileData
{
public int playerCount;
2026-01-23 12:46:59 +05:30
public Transform commonPlacementTransform;
public Dictionary<int, PlayerPawn> playerPawns;
}
2026-01-21 20:27:45 +05:30
public class Tile : MonoBehaviour
{
2026-01-23 12:46:59 +05:30
[SerializeField] protected bool isSafeZone = false;
2026-01-21 20:27:45 +05:30
public bool IsSafeZone => isSafeZone;
2026-01-23 12:46:59 +05:30
public Vector3 CenterPlacementPosition => transform.position;
2026-01-23 12:46:59 +05:30
protected int lastOccupiedIndex = 0;
2026-01-23 12:46:59 +05:30
public PlayerPawn PlayerPawn // Change implementation
{
2026-01-23 12:46:59 +05:30
get; private set;
}
2026-01-23 12:46:59 +05:30
public virtual void InitPlayerPawn(PlayerPawn playerPawn, PlayerTypes playerType)
2026-01-21 20:27:45 +05:30
{
PlayerPawn = playerPawn;
}
}