void Awake() { planetHealth = GetComponent <PlanetHealth>(); planetShield = GetComponent <PlanetShield>(); stockPile = GetComponent <StockPile>(); planetStats = GetComponent <PlanetStats>(); }
// Use this for initialization void Start() { localPlayer = PlayerManager.LocalPlayerInstance; stockpile = localPlayer.GetComponent <StockPile>(); currency = localPlayer.GetComponent <Currency>(); interceptor = localPlayer.GetComponent <PlanetInterceptor>(); planetShield = localPlayer.GetComponent <PlanetShield>(); SetCostForAllWeapons(); }
void Start() { if (photonView.isMine) { SetPlayerName(PhotonNetwork.playerName); } planet = GetComponent <Planet>(); planetShield = GetComponent <PlanetShield>(); planetHealth = GetComponent <PlanetHealth>(); maxShield = GetComponent <PlanetStats>().GetStat(StatType.MaxShield); maxHealth = GetComponent <PlanetStats>().GetStat(StatType.MaxHealth); }