コード例 #1
0
    //Set te CreateManager's variables to reflect the selected beast
    void SetSlot()
    {
        if (gameObject.name == "Slot1")
        {
            createManager.slot1 = createManager.selected;
        }
        else if (gameObject.name == "Slot2")
        {
            createManager.slot2 = createManager.selected;
        }
        else if (gameObject.name == "Slot3")
        {
            createManager.slot3 = createManager.selected;
        }
        else if (gameObject.name == "Slot4")
        {
            createManager.slot4 = createManager.selected;
        }
        else if (gameObject.name == "Slot5")
        {
            createManager.slot5 = createManager.selected;
        }
        else if (gameObject.name == "Slot6")
        {
            createManager.slot6 = createManager.selected;
        }



        thisBeast      = createManager.selected;
        thisBeastIndex = createManager.selectedIndex;

        createManager.placed += 1;
        createManager.placing = false;
        createManager.CheckPlaceable();
        createManager.selected      = "";
        createManager.selectedIndex = -1;
        createManager.TurnOffSlots();
    }