private void CheckInput() { if (Input.GetKeyDown(KeyCode.W)) { AddInputCommand(actor.GetActorWAttackCommand()); } if (Input.GetKeyDown(KeyCode.A)) { AddInputCommand(actor.GetActorAAttackCommand()); } if (Input.GetKeyDown(KeyCode.S)) { AddInputCommand(actor.GetActorSAttackCommand()); } if (Input.GetKeyDown(KeyCode.D)) { AddInputCommand(actor.GetActorDAttackCommand()); } if (Input.GetKeyDown(KeyCode.Backspace)) { BackspaceLastCommand(); } if (Input.GetKeyDown(KeyCode.Return)) { StartCoroutine(ExecuteAllCommands()); } }
public void SetCommandAttackButtons(BaseActor actor) { if (actor.GetActorWAttackCommand() != null) { SetButtonText(wCommandButton, "[W] " + actor.GetActorWAttackCommand().GetCommandName()); } else { SetButtonText(wCommandButton, "[W] Empty"); } if (actor.GetActorAAttackCommand() != null) { SetButtonText(aCommandButton, "[A] " + actor.GetActorAAttackCommand().GetCommandName()); } else { SetButtonText(aCommandButton, "[A] Empty"); } if (actor.GetActorSAttackCommand() != null) { SetButtonText(sCommandButton, "[S] " + actor.GetActorSAttackCommand().GetCommandName()); } else { SetButtonText(sCommandButton, "[S] Empty"); } if (actor.GetActorDAttackCommand() != null) { SetButtonText(dCommandButton, "[D] " + actor.GetActorDAttackCommand().GetCommandName()); } else { SetButtonText(dCommandButton, "[D] Empty"); } }