void doCast(Graph spell) { foreach (Node n in spell.Traverse()) { CommandPattern.Command c = (n as CommandPattern.Command); if (c != null) { Dictionary <string, object> args = new Dictionary <string, object>(); args.Add("primitive", PrimitiveType.Sphere); args.Add("position", transform.position); args.Add("direction", transform.forward * 2); args.Add("object", "orb"); c.Execute(null, args); if (c.nname == "EXPLODE") { } } } }
IEnumerator DoCast(GameObject go, Graph spell) { foreach (Node n in spell.Traverse()) { CommandPattern.Command c = (n as CommandPattern.Command); if (c == null) { continue; } Dictionary <string, object> args = new Dictionary <string, object>(); args.Add("primitive", PrimitiveType.Sphere); args.Add("position", transform.position); args.Add("direction", transform.forward * 2); args.Add("object", "orb"); //if (c.name == "EXPLODE") //{ // } c.Execute(go, args); yield return(new WaitForSeconds(.1f)); } }
private void ExecuteNewCommand(Command command) { command.Execute(); _commandsNav.AddToUndo(command); _commandsNav.ClearRedo(); }
public void StoreAndExecute(Command cmd) { this.commandHistory.Add(cmd); cmd.Execute(); Console.WriteLine("Command Executes"); }
public int ExecuteCommand(Command command) { return(command.Execute()); }
public void Click() { Console.WriteLine("Clicked copy button"); _command.Execute(); }
public void Record(string statement) { var command = new Command(_receiver, statement); command.Execute(); StoreCommand(command); }
public void ButtonWasPressed() { command.Execute(); }