Esempio n. 1
0
    public void SetVars(int n) //n is the number button this is, which determines invSlot, and therefore the Weapon this refers to and the text
    {
        invSlot = n;
        if (PlayerStatus.Ship.weaponSlots[invSlot].equippedWeapon != null)
        {
            shipWeapon        = PlayerStatus.Ship.weaponSlots[invSlot].equippedWeapon;
            armamentName.text = shipWeapon.GetName();
        }
        else
        {
            armamentName.text = "[EMPTY" + PlayerStatus.Ship.weaponSlots[invSlot].validTypesString() + " Slot]";
        }

        slot.text = "Slot " + (n + 1);
    }
Esempio n. 2
0
    public void SetVars(int n)
    {
        invSlot = n;
        if (PlayerStatus.Ship.weaponSlots[invSlot].equippedWeapon != null)
        {
            shipWeapon        = PlayerStatus.Ship.weaponSlots[invSlot].equippedWeapon;
            armamentName.text = shipWeapon.GetName();
        }
        else
        {
            armamentName.text = "[EMPTY]";
        }

        slot.text = "Slot " + (n + 1);
    }