예제 #1
0
        /*
         * public void OnEnable() {
         *  ToggleMovementPanel();
         * }
         */

        private void InitializeKeys()
        {
            //Debug.Log("KeyBindMenuController.InitializeKeys()");
            foreach (KeyBindNode keyBindNode in keyBindManager.KeyBinds.Values)
            {
                Transform nodeParent = null;
                UINavigationController uINavigationController = null;
                if (keyBindNode.KeyBindType == KeyBindType.Action)
                {
                    nodeParent             = actionBarsKeyParent.transform;
                    uINavigationController = uINavigationControllers[2];
                }
                else if (keyBindNode.KeyBindType == KeyBindType.Normal)
                {
                    nodeParent             = movementKeyParent.transform;
                    uINavigationController = uINavigationControllers[1];
                }
                else if (keyBindNode.KeyBindType == KeyBindType.Constant || keyBindNode.KeyBindType == KeyBindType.System)
                {
                    nodeParent             = systemKeyParent.transform;
                    uINavigationController = uINavigationControllers[3];
                }
                if (nodeParent != null)
                {
                    KeyBindSlotScript keyBindSlotScript = objectPooler.GetPooledObject(keyBindButtonPrefab, nodeParent).GetComponent <KeyBindSlotScript>();
                    keyBindSlotScript.Configure(systemGameManager);
                    keyBindSlotScript.Initialize(keyBindNode);
                    keyBindNode.SetSlotScript(keyBindSlotScript);
                    uINavigationController.AddActiveButton(keyBindSlotScript.KeyboardAssignButton);
                }
            }
        }
 private void InitializeKeys()
 {
     //Debug.Log("KeyBindMenuController.InitializeKeys()");
     foreach (KeyBindNode keyBindNode in KeyBindManager.MyInstance.MyKeyBinds.Values)
     {
         Transform nodeParent = null;
         if (keyBindNode.MyKeyBindType == KeyBindType.Action)
         {
             nodeParent = actionKeyParent.transform;
         }
         else if (keyBindNode.MyKeyBindType == KeyBindType.Normal)
         {
             nodeParent = otherKeyParent.transform;
         }
         else if (keyBindNode.MyKeyBindType == KeyBindType.Constant)
         {
             nodeParent = systemKeyParent.transform;
         }
         KeyBindSlotScript keyBindSlotScript = Instantiate(keyBindButtonPrefab, nodeParent).GetComponent <KeyBindSlotScript>();
         keyBindSlotScript.Initialize(keyBindNode);
         keyBindNode.SetSlotScript(keyBindSlotScript);
     }
 }