// Update is called once per frame void Update() { if (Input.GetKey(KeyCode.W)) { moveForward.Execute(); } if (Input.GetKey(KeyCode.A)) { moveLeft.Execute(); } if (Input.GetKey(KeyCode.S)) { moveDown.Execute(); } if (Input.GetKey(KeyCode.D)) { moveRight.Execute(); } if (Input.GetKey(KeyCode.Q)) { undo.Execute(); } if (Input.GetKeyDown(KeyCode.E)) { wall.Wall(); } }
public void Execute() { wall.Wall(); }