123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- using UnityEngine;
- using System.Collections;
- using System.Collections.Generic;
- public class Command
- {
- public const string ConnectionError = "ce";
- public const string EnterBase = "EnterBase";
- public const string SearchRoom = "sr";
- public const string MessageArray = "ma";
- public const string PlayerJoin = "pj";
- public const string PlayerLeft = "pl";
- public const string TutorialComplete = "TutorialComplete";
-
- public const string BattleStart = "bs";
- public const string BattleInfo = "bi";
- public const string AITaker = "at";
- public const string AITakerRequest = "ar";
- //battle msg include start
- public const string Ready = "Ready";
- public const string Start = "sr";
- public const string State = "State";
- public const string Move = "Move";
- public const string Target = "Target";
- public const string Attack = "Attack";
- public const string Dead = "Dead";
- public const string Station = "Station";
- public const string CraftSelection = "CraftSelection";
- public const string Radio = "Radio";
- public const string PrepareSwap = "PrepareSwap";
- public const string RequestSwap = "RequestSwap";
- public const string SimpleSync = "SimpleSync";
- public const string BattleExit = "be";
- // public const string ScoreInfo = "ScoreInfo";
-
- public const string AddMapItem = "AddMapItem";
- public const string GetMapItem = "GetMapItem";
-
- public const string FlagSync = "FlagSync";
- public const string AddFlag = "AddFlag";
- public const string GetFlag = "GetFlag";
- public const string PutFlag = "PutFlag";
- public const string CaptureFlag= "CaptureFlag";
-
- public const string MiniMapAlert = "MiniMapAlert";
- //team
- public const string TeamInvite = "ti";
- public const string TeamJoin = "tj";
- public const string TeamLeft = "tl";
- public const string TeamState = "ts";
- public const string TeamKick = "tk";
- //clan
- public const string ClanInit = "ci";
- public const string ClanOnline = "co";
- public const string ClanOffline = "cf";
- public const string ClanBattle = "cb";
- public const string ClanMessage = "cm";
- public const string ClanJoin = "cj";
- public const string ClanLeft = "cl";
- private static Dictionary<string, bool> zoneExtensionCommands;
- public static bool IsRoomExtensionCommand(string cmd)
- {
- if(zoneExtensionCommands == null)
- {
- zoneExtensionCommands = new Dictionary<string, bool> ();
- zoneExtensionCommands.Add (ClanInit, false);
- zoneExtensionCommands.Add (ClanOnline, false);
- zoneExtensionCommands.Add (ClanOffline, false);
- zoneExtensionCommands.Add (ClanBattle, false);
- zoneExtensionCommands.Add (ClanJoin, false);
- zoneExtensionCommands.Add (ClanLeft, false);
- zoneExtensionCommands.Add (TeamInvite, false);
- zoneExtensionCommands.Add (TeamJoin, false);
- zoneExtensionCommands.Add (TeamLeft, false);
- zoneExtensionCommands.Add (TeamState, false);
- zoneExtensionCommands.Add (TeamKick, false);
- }
-
- return !zoneExtensionCommands.ContainsKey(cmd);
- }
- }
|