private void Start() { // Instantiate player on scene Transform instantiatedPlayer = Instantiate(this.Player, this.PlayerSpawn, Quaternion.identity) as Transform; Instantiate(this.SoulBag); if (instantiatedPlayer != null) { this._kosorub = instantiatedPlayer.GetComponent<Kosorub>(); this._health = instantiatedPlayer.GetComponent<Health>(); // Game variables this._souls = 0; this._uiManager.SetSouls(this._souls); this._uiManager.SetHealth(this._health.Healthpoints); } }
private void Start() { // Instantiate player on scene Transform instantiatedPlayer = Instantiate(this.Player, this.PlayerSpawn, Quaternion.identity) as Transform; Instantiate(this.SoulBag); if (instantiatedPlayer != null) { this._kosorub = instantiatedPlayer.GetComponent <Kosorub>(); this._health = instantiatedPlayer.GetComponent <Health>(); // Game variables this._souls = 0; this._uiManager.SetSouls(this._souls); this._uiManager.SetHealth(this._health.Healthpoints); } }