public void SetLocalPawn(PawnObserver pawn, UIHealthBarController healthBar) { if (LocalAsset != null) { UnityEngine.Object.Destroy(LocalAsset); } LocalAsset = pawn; SetPawn(PhotonNetwork.player, pawn, healthBar); }
public void Init() { //Инициализировать данные m_HealthData = new Dictionary <AbilityTypes, HealthSegment>(); for (int i = 0; i < HealthData.Length; i++) { if (!m_HealthData.ContainsKey(HealthData[i].Type)) { HealthData[i].Init(); m_HealthData.Add(HealthData[i].Type, HealthData[i]); } } //Инициализировать UI m_UIHealthBarController = PoolManager.GetObject(GameManager.Instance.PrefabLibrary.UIHealthBarPrefab) as UIHealthBarController; m_UIHealthBarController.transform.position = HealthBarSpawnPoint.position; m_UIHealthBarController.Init(transform, m_HealthData); }
void Awake() { instance = this; }
public void SetPawn(PhotonPlayer player, PawnObserver pawn, UIHealthBarController healthBar) { _pawns[pawn] = new PawnState(player, healthBar); }
public PawnState(PhotonPlayer player, UIHealthBarController statusBar) { Player = player; _statusBar = statusBar; Health = HEALTH_START_I; }