示例#1
0
        private void Cmd_OnRequestControllerID(NetworkIdentity networkIdentity)
        {
            Debug.Log("Cmd_OnRequestControllerID : " + networkIdentity.connectionToClient.ToString());

            NetControllerInputSource netControllerInputSource = InputManager.Instance.GetInputSource <NetControllerInputSource>();

            if (netControllerInputSource)
            {
                EControllerID newControllerID = netControllerInputSource.OnNewNCJoined(this);
                Debug.Log("Assigned controller ID : " + newControllerID);

                Target_OnAssignedControllerID(networkIdentity.connectionToClient, newControllerID);
            }
        }
示例#2
0
        private void Cmd_OnJoystickMoved(EControllerID controllerID, EInputAxis joystickType, float x, float y)
        {
            Debug.Log("Cmd_OnJoystickMoved : " + joystickType + " - " + controllerID);

            // temporary solution
            NetControllerInputSource netControllerInputSource = InputManager.Instance.GetInputSource <NetControllerInputSource>();

            if (netControllerInputSource)
            {
                netControllerInputSource.PlayerNCListener_OnJoystickMoved(controllerID, joystickType, x, y);
            }

            // TODO : Fix
            //if (JoystickMoved != null)
            //{
            //    Debug.Log("JoystickMoved");

            //    JoystickMoved.Invoke(controllerID, joystickType, x, y);
            //}
        }
示例#3
0
        private void Cmd_OnButtonReleased(EControllerID controllerID, EInputButton inputButton)
        {
            Debug.Log("Cmd_OnButtonReleased : " + inputButton + " - " + controllerID);

            // temporary solution
            NetControllerInputSource netControllerInputSource = InputManager.Instance.GetInputSource <NetControllerInputSource>();

            if (netControllerInputSource)
            {
                Debug.Log("Calling ButtonReleased: " + inputButton + " - " + controllerID);

                netControllerInputSource.PlayerNCListener_OnButtonReleased(controllerID, inputButton);
            }

            // TODO: Fix
            //if (ButtonReleased != null)
            //{
            //    ButtonReleased.Invoke(controllerID, inputButton);
            //}
        }