Esempio n. 1
0
        /// <summary>
        /// This function is called when the object becomes enabled and active.
        /// </summary>
        void OnEnable()
        {
            roleAction = GetComponent <IRoleAction>();

            InputManager.Instance.Subscript("Gaming", new BindingInputAction("player2", (s, value) =>
            {
                OnInput(s, value);
            }));
        }
Esempio n. 2
0
        void OnEnable()
        {
            roleAction = GetComponent <IRoleAction>();

            InputManager.Instance.Subscript("Gaming", new BindingInputAction("player1", (s, value) =>
            {
                if (DebugManager.Instance.debugData.useKeyboard)
                {
                    OnInput(s, value);
                }
                else
                {
                    OnXboxInput(s, value);
                }
            }));

            InputManager.Instance.SwitchActions("Gaming");


            GetComponentInChildren <AnimatorStateTransmit>().OnStateEvents += UpdateMovement;
        }
 public UserController(IUserMasterAction userMasterAction, IRoleAction roleAction)
 {
     this._userMasterAction = userMasterAction;
     this._roleAction       = roleAction;
 }