void InputCheck() { if (Input.GetMouseButton(1)) { CalcDir.Execute(playerActor, PlayerState.Move); } else if (Input.GetMouseButtonUp(1)) { ResetDir.Execute(playerActor, PlayerState.Idle); } else if (Input.GetMouseButtonDown(0)) { Attack.Execute(playerActor, PlayerState.Attack); } else if (Input.GetMouseButton(0)) { CalcDir.Execute(playerActor, PlayerState.Attack); } else if (Input.GetMouseButtonUp(0)) { Attack.Execute(playerActor, PlayerState.Idle); } else if (Input.GetMouseButton(1) && Input.GetMouseButtonDown(0)) { Attack.Execute(playerActor, PlayerState.Attack); } }
protected override void OnOwnerCommand(PlayerCommand command) { command.Execute(this); }