コード例 #1
0
 void Start()
 {
     if (puppetAbilities == null)
     {
         puppetAbilities = GetComponent <CharacterPuppet>() as CharacterAbilitiesBehaviour;
     }
 }
コード例 #2
0
        void Start()
        {
            if (puppetAbilities == null)
            {
                puppetAbilities = GetComponentInChildren <CharacterPuppet>() as CharacterAbilitiesBehaviour;
            }
            if (cam == null)
            {
                cam = Camera.main;
            }

            #if JamToolsUseInControl
            switch (inputMode)
            {
            case InputMode.InControl:
                if (InputManager.Devices.Count > playerIndex && playerIndex >= 0)
                {
                    inputDevice = InputManager.Devices[playerIndex];
                }
                break;

            case InputMode.InControlTouchAnalogue:
                touchDevice = TouchManager.Device;
                break;
            }

            touchButtonPad.touchButtonPadActions[(int)TouchButtonPad.TouchButtonPadAction.SwipeUp] = puppetAbilities.Jump;
            touchButtonPad.touchButtonPadActions[(int)TouchButtonPad.TouchButtonPadAction.Tap]     = AttackAction;
            #else
            Debug.Log("Using input without InControl");
            #endif
        }