Exemplo n.º 1
0
        public void UnequipAll()
        {
            WeaponSlot.Unequip();   // ensure this item's Unequip effects happen
            WeaponSlot = new NoEquipment();

            HelmetSlot.Unequip();   // ensure this item's Unequip effets happen
            HelmetSlot = new NoEquipment();
        }
Exemplo n.º 2
0
 public InventorySystem()
 {
     Content    = new ItemSlot[14];
     Content[0] = new HelmetSlot();
     Content[1] = new ChestSlot();
     Content[2] = new LegSlot();
     Content[3] = new FootSlot();
     Content[4] = new WeaponSlot();
     Content[5] = new RingSlot();
     Content[6] = new RingSlot();
     Content[7] = new TrinketSlot();
     Content[8] = new TrinketSlot();
     for (int i = 9; i < 14; i++)
     {
         Content[i] = new InventorySlot();
     }
 }
Exemplo n.º 3
0
 private void GatherPlayerComponents()
 {
     playerController   = GetComponentInChildren <PlayerController>();
     weaponChargeCanvas = GetComponentInChildren <WeaponChargeCanvas>();
     rb                  = GetComponentInChildren <Rigidbody>();
     playerCam           = GetComponentInChildren <PlayerCamera>();
     entity              = GetComponentInChildren <Entity>();
     weaponSlot          = GetComponentInChildren <WeaponSlot>();
     helmetSlot          = GetComponentInChildren <HelmetSlot>();
     trinketSlot         = GetComponentInChildren <TrinketSlot>();
     myInventory         = GetComponentInChildren <Inventory>();
     dwarfAnimController = GetComponentInChildren <DwarfAnimationsScript>();
     dwarfAnimEvents     = GetComponentInChildren <AnimationEventsDwarf>();
     iKControl           = GetComponentInChildren <IKControl>();
     playerAppearance    = GetComponentInChildren <PlayerAppearance>();
     reviveZone          = GetComponentInChildren <ReviveZone>();
     cameraShake         = GetComponentInChildren <CameraShake>();
 }
Exemplo n.º 4
0
        public InventorySystem(Item[] items, double money)
        {
            Money      = money;
            Content    = new ItemSlot[14];
            Content[0] = new HelmetSlot();
            Content[1] = new ChestSlot();
            Content[2] = new LegSlot();
            Content[3] = new FootSlot();
            Content[4] = new WeaponSlot();
            Content[5] = new RingSlot();
            Content[6] = new RingSlot();
            Content[7] = new TrinketSlot();
            Content[8] = new TrinketSlot();
            for (int i = 9; i < 14; i++)
            {
                Content[i] = new InventorySlot();
            }

            for (int i = 0; i < 14; i++)
            {
                Content[i].slotItem = items[i];
            }
        }
Exemplo n.º 5
0
 public void EquipHelmet(IEquippable helmet)
 {
     HelmetSlot.Unequip();
     HelmetSlot = helmet;
     HelmetSlot.Equip();
 }