Command.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. public class Command
  5. {
  6. public const string ConnectionError = "ce";
  7. public const string EnterBase = "EnterBase";
  8. public const string SearchRoom = "sr";
  9. public const string MessageArray = "ma";
  10. public const string PlayerJoin = "pj";
  11. public const string PlayerLeft = "pl";
  12. public const string TutorialComplete = "TutorialComplete";
  13. public const string BattleStart = "bs";
  14. public const string BattleInfo = "bi";
  15. public const string AITaker = "at";
  16. public const string AITakerRequest = "ar";
  17. //battle msg include start
  18. public const string Ready = "Ready";
  19. public const string Start = "sr";
  20. public const string State = "State";
  21. public const string Move = "Move";
  22. public const string Target = "Target";
  23. public const string Attack = "Attack";
  24. public const string Dead = "Dead";
  25. public const string Station = "Station";
  26. public const string CraftSelection = "CraftSelection";
  27. public const string Radio = "Radio";
  28. public const string PrepareSwap = "PrepareSwap";
  29. public const string RequestSwap = "RequestSwap";
  30. public const string SimpleSync = "SimpleSync";
  31. public const string BattleExit = "be";
  32. // public const string ScoreInfo = "ScoreInfo";
  33. public const string AddMapItem = "AddMapItem";
  34. public const string GetMapItem = "GetMapItem";
  35. public const string FlagSync = "FlagSync";
  36. public const string AddFlag = "AddFlag";
  37. public const string GetFlag = "GetFlag";
  38. public const string PutFlag = "PutFlag";
  39. public const string CaptureFlag= "CaptureFlag";
  40. public const string MiniMapAlert = "MiniMapAlert";
  41. //team
  42. public const string TeamInvite = "ti";
  43. public const string TeamJoin = "tj";
  44. public const string TeamLeft = "tl";
  45. public const string TeamState = "ts";
  46. public const string TeamKick = "tk";
  47. //clan
  48. public const string ClanInit = "ci";
  49. public const string ClanOnline = "co";
  50. public const string ClanOffline = "cf";
  51. public const string ClanBattle = "cb";
  52. public const string ClanMessage = "cm";
  53. public const string ClanJoin = "cj";
  54. public const string ClanLeft = "cl";
  55. private static Dictionary<string, bool> zoneExtensionCommands;
  56. public static bool IsRoomExtensionCommand(string cmd)
  57. {
  58. if(zoneExtensionCommands == null)
  59. {
  60. zoneExtensionCommands = new Dictionary<string, bool> ();
  61. zoneExtensionCommands.Add (ClanInit, false);
  62. zoneExtensionCommands.Add (ClanOnline, false);
  63. zoneExtensionCommands.Add (ClanOffline, false);
  64. zoneExtensionCommands.Add (ClanBattle, false);
  65. zoneExtensionCommands.Add (ClanJoin, false);
  66. zoneExtensionCommands.Add (ClanLeft, false);
  67. zoneExtensionCommands.Add (TeamInvite, false);
  68. zoneExtensionCommands.Add (TeamJoin, false);
  69. zoneExtensionCommands.Add (TeamLeft, false);
  70. zoneExtensionCommands.Add (TeamState, false);
  71. zoneExtensionCommands.Add (TeamKick, false);
  72. }
  73. return !zoneExtensionCommands.ContainsKey(cmd);
  74. }
  75. }