/// <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); })); }
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; }