Esempio n. 1
0
 private void UpdateState(IInternalCommand command)
 {
     if (command is ObjectEnterAreaCommand)
     {
         this.AddObject((ObjectEnterAreaCommand)command);
     }
     else if (command is ObjectLeaveAreaCommand)
     {
         this.RemoveObject((ObjectLeaveAreaCommand)command);
     }
 }
Esempio n. 2
0
 private void UpdateStatePersistent(IInternalCommand command)
 {
     this.InternalPersist(command, this.UpdateState);
 }
Esempio n. 3
0
 /// <summary>Add a console command.</summary>
 /// <param name="command">the SMAPI console command to add.</param>
 /// <param name="monitor">Writes messages to the console.</param>
 /// <exception cref="ArgumentException">There's already a command with that name.</exception>
 public CommandManager Add(IInternalCommand command, IMonitor monitor)
 {
     return(this.Add(null, command.Name, command.Description, (name, args) => command.HandleCommand(args, monitor)));
 }