示例#1
0
    public void DisplayKey(ref byte offset, ref byte keyIndex)
    {
        Keys <TModuleType> key = this.inventory.Keys[keyIndex];

        if (GUI.Button(MultiResolutions.Rectangle(0, offset * 0.05f, 0.17f, 0.05f), StuffGUI <TModuleType> .GetKeyName(key)))
        {
            this.SelectThisItem(keyIndex, ItemExtension.FiltreKeys);
        }

        ++keyIndex;
        ++offset;
    }
示例#2
0
    public void ShowItemMesh(int itemIndex)
    {
        Rect rectToPutMesh = new Rect(0.6f, 0.00f, 0.17f, 0.50f);

        if (this.itemSelectedFiltre == ItemExtension.FiltreWeapon)
        {
            var stuff = this.inventory.Weapons[itemIndex];

            this.meshToDisplay = this.CreateAndRotateItemMesh(this.meshToDisplay, stuff.Mesh, StuffGUI <TModuleType> .GetStuffName(stuff), rectToPutMesh, 5f);
        }
        else if (this.itemSelectedFiltre == ItemExtension.FiltreClothe)
        {
            var stuff = this.inventory.Clothes[itemIndex];

            this.meshToDisplay = this.CreateAndRotateItemMesh(this.meshToDisplay, stuff.Mesh, StuffGUI <TModuleType> .GetStuffName(stuff), rectToPutMesh, 5f);
        }
        else if (itemSelectedFiltre == ItemExtension.FiltreKeys)
        {
            var stuff = this.inventory.Keys[itemIndex];

            this.meshToDisplay = this.CreateAndRotateItemMesh(this.meshToDisplay, stuff.Mesh, StuffGUI <TModuleType> .GetKeyName(stuff), rectToPutMesh, 5f);
        }
        //else if (itemSelectedFiltre == ItemExtension.FiltreConsommable)
        //{
        //	var stuff = inventory.consommables[itemIndex];

        //	meshToDisplay = CreateAndRotateItemMesh(meshToDisplay, stuff.mesh, "Consommable", rectToPutMesh, 5f);
        //}
        //Debug.Log(itemIndex);
    }