public void Awake() { this.playerHud = FindObjectOfType <UIPlayerHud>(); this.inventory = GetComponent <Inventory>(); this.NestSprite(); EquipWeapon(this.equippedWeaponIndex); EquipItem(this.equippedItemIndex); }
public void Awake() { this.playerActor = GetComponent <Actor>(); this.playerMovement = GetComponent <IMovable>(); this.levelMovement = GameObject.FindGameObjectWithTag(Tags.AutoScroll).GetComponent <IMovable>(); this.originalPlayerSpeed = this.playerMovement.Speed; this.originalLevelSpeed = this.levelMovement.Speed; UIPlayerHud playerHud = FindObjectOfType <UIPlayerHud>(); Transform upgradesUI = playerHud.transform.Find("Upgrades"); this.upgradeImages = upgradesUI.gameObject.GetComponentsInChildren <Image>(true); ResetUpgrades(); }