public void Awake()
 {
     this.playerHud = FindObjectOfType <UIPlayerHud>();
     this.inventory = GetComponent <Inventory>();
     this.NestSprite();
     EquipWeapon(this.equippedWeaponIndex);
     EquipItem(this.equippedItemIndex);
 }
Exemple #2
0
        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();
        }