// Start is called before the first frame update void Start() { if (TryGetComponent(out UISliderFloatIndicator manaSlider)) { this.manaSlider = manaSlider; } if (manaValue == null) { Debug.LogError("No text area here", this); } StartCoroutine("WaitForClientMoneyController"); }
private void Start() { if (TryGetComponent(out UISliderFloatIndicator UISliderFloatIndicator)) { this.UISliderFloatIndicator = UISliderFloatIndicator; } if (HealthValue == null) { Debug.LogError("No text area here", this); } if (ClientPlayerManager.singleton != null) { ClientPlayerManager.singleton.OnPlayerCharacterUpdate += new ClientPlayerManager.PlayerCharacterChangedHandler(CharacterChanged); EventCall = new Character.ChangeHealthHandler(HealthUpdated); } else { clientPlayerManger.OnPlayerCharacterUpdate += new ClientPlayerManager.PlayerCharacterChangedHandler(CharacterChanged); EventCall = new Character.ChangeHealthHandler(HealthUpdated); } }
private void Awake() { if (TryGetComponent(out TowerPlacer towerPlacer)) { this.towerPlacer = towerPlacer; } if (TowerErrorText == null) { Debug.LogError("This doesn't have text mesh pro!", this); } TowerErrorText.text = ""; if (TryGetComponent(out UISliderFloatIndicator BuildingProgressSlider)) { this.BuildingProgressSlider = BuildingProgressSlider; } towerPlacer.OnStartBuildingATower += new TowerPlacer.MyTowerEventHandler(StartedBuilding); towerPlacer.OnCancelingBuildingATower += new TowerPlacer.MyTowerEventHandler(FinishedBuilding); towerPlacer.OnFinishedBuildingATower += new TowerPlacer.MyTowerEventHandler(FinishedBuilding); }