private void LookTowards(Direction direction) { if (objectSelector.GetSelectedObject() == null) { return; } if (objectSelector.GetSelectedObject().IsType <IMoveable>()) { CommandQueue.Commands command = CommandQueue.Commands.LookDown; switch (direction) { case Direction.N: command = CommandQueue.Commands.LookUp; break; case Direction.S: command = CommandQueue.Commands.LookDown; break; case Direction.E: command = CommandQueue.Commands.LookRight; break; case Direction.W: command = CommandQueue.Commands.LookLeft; break; } ((IHasQueue)objectSelector.GetSelectedObject()).AddCommand(command); } }
public bool AddCommand(Commands function) { return(commandQueue.AddCommand(function)); }