Пример #1
0
        /// <summary>
        /// Constructor : instatiate the inventory slots
        /// </summary>
        public PlayerInventory(Transform cameraTransform, [CanBeNull] PlayerUIScript ui, PhotonView playerPhotonView, WeaponHolderScript weaponHolder, ConsommableHolderScript consommableHolder)
        {
            playerView             = playerPhotonView;
            camera                 = cameraTransform;
            inventory              = new PlayerInventorySlot[5];
            this.weaponHolder      = weaponHolder;
            this.consommableHolder = consommableHolder;

            playerUI = ui;

            for (var i = 0; i < inventory.Length; i++)
            {
                inventory[i] = new PlayerInventorySlot();
            }
        }