MinMapGetSetCommand.cs 504 B

123456789101112131415161718192021222324
  1. using Blue;
  2. /// <summary>
  3. /// 小地图开关设置命令
  4. /// </summary>
  5. public class MinMapGetSetCommand : ICommand
  6. {
  7. private int minMap =2;
  8. public MinMapGetSetCommand()
  9. {
  10. }
  11. public MinMapGetSetCommand(int minMap)
  12. {
  13. this.minMap = minMap;
  14. }
  15. public void OnExcute()
  16. {
  17. if(minMap == 2)
  18. this.GetService<IMinMapService>().Get();
  19. else
  20. this.GetService<IMinMapService>().setMinMap.Value =minMap;
  21. }
  22. }