Example #1
0
 void Update()
 {
     if (Input.GetButtonDown(nameof(Command.North)))
     {
         controller.AddCommand(Command.North);
     }
     if (Input.GetButtonDown(nameof(Command.South)))
     {
         controller.AddCommand(Command.South);
     }
     if (Input.GetButtonDown(nameof(Command.East)))
     {
         controller.AddCommand(Command.East);
     }
     if (Input.GetButtonDown(nameof(Command.West)))
     {
         controller.AddCommand(Command.West);
     }
     if (Input.GetButtonDown(nameof(Command.Grab)))
     {
         controller.AddCommand(Command.Grab);
     }
     if (Input.GetButtonDown(nameof(Command.Drop)))
     {
         controller.AddCommand(Command.Drop);
     }
     if (Input.GetButtonDown(nameof(Command.Execute)))
     {
         controller.AddCommand(Command.Execute);
     }
 }