コード例 #1
0
    void PerformSlotClick(int slot, dfPanel panel)
    {
        if (MyRobot != null)
        {
            activePanel.DeactivatePanel();
            MyRobot.SwitchBrain(slot);

            switch (slot)
            {
            case 1:
                activePanel = Slot1.GetComponent <BrainPanelState>();
                break;

            case 2:
                activePanel = Slot2.GetComponent <BrainPanelState>();
                break;

            case 3:
                activePanel = Slot3.GetComponent <BrainPanelState>();
                break;

            case 4:
                activePanel = Slot4.GetComponent <BrainPanelState>();
                break;
            }
            activePanel.ActivatePanel();
        }
    }