2026-01-21 20:27:45 +05:30
|
|
|
using UnityEngine;
|
|
|
|
|
|
2026-01-23 15:32:48 +05:30
|
|
|
[System.Serializable]
|
|
|
|
|
public class BasePlacementData
|
|
|
|
|
{
|
|
|
|
|
public int playerBaseId;
|
|
|
|
|
public Transform placementTransform;
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-21 20:27:45 +05:30
|
|
|
public class PlayerBase : MonoBehaviour
|
|
|
|
|
{
|
2026-01-23 15:32:48 +05:30
|
|
|
[SerializeField] private PlayerTypes playerType;
|
|
|
|
|
[SerializeField] private BasePlacementData[] basePlacementDatas;
|
|
|
|
|
[SerializeField] private PlayerPawn[] playerPawns;
|
|
|
|
|
|
|
|
|
|
public PlayerTypes GetPlayerType() => playerType;
|
|
|
|
|
|
|
|
|
|
public void InitPlayerIds()
|
2026-01-21 20:27:45 +05:30
|
|
|
{
|
2026-01-23 15:32:48 +05:30
|
|
|
for (int idx = 0; idx < basePlacementDatas.Length; idx++)
|
|
|
|
|
{
|
|
|
|
|
playerPawns[idx].InitId(basePlacementDatas[idx].playerBaseId);
|
|
|
|
|
}
|
2026-01-21 20:27:45 +05:30
|
|
|
}
|
|
|
|
|
|
2026-01-23 15:32:48 +05:30
|
|
|
public BasePlacementData GetBasePlacementData(int idx)
|
2026-01-21 20:27:45 +05:30
|
|
|
{
|
2026-01-23 15:32:48 +05:30
|
|
|
return basePlacementDatas[idx];
|
2026-01-21 20:27:45 +05:30
|
|
|
}
|
|
|
|
|
}
|