public void Handle(object objData) { var data = (Message_ServerResponse_CreateSpellInStaticPosition)objData; bool isMine = UnityConfig.GetPersistentDataContainer().persistentData.PlayerInfo.GUID == data.request.ownerGUID; InGameWrapper.instance.spellsWrapper.SpawnSpell(data, isMine); }
// Use this for initialization public void StartMatchMakingClient() { IMMEventHandler iMMEventHandler = new MM_EventHandler(); ILogger logger = new UnityLogger(); PersistentData data = UnityConfig.GetPersistentDataContainer().persistentData; string name = UnityConfig.GetName(); clientEndPoint = new MatchMakerClient(config, iMMEventHandler, logger, data, name); }
// Use this for initialization public void StartOnlineClient(ILogger logger) { var matchEventHandler = new Match_EventHandler(mM_GUIHandler); var data = UnityConfig.GetPersistentDataContainer().persistentData; var messageHandlerExpansion = MessageHandlerFactory.CreateMessageHandlerExpansion(); var config = new UnityClientConfig(InGameWrapper.instance.clockWrapper); clientEndPoint = new MatchClient(matchEventHandler, logger, data, messageHandlerExpansion, config); }
public void Handle(object objData) { var data = (Message_ServerCommand_CreateGameObject)objData; bool isMine = UnityConfig.GetPersistentDataContainer().persistentData.PlayerInfo.GUID == data.OwnerGUID; InGameWrapper.instance.playersWrapper.SpawnPlayer(data, isMine); //Debug.Log("Spawning " + data.Type.ToString() + ", for me? is " // + (UnityConfig.GetPersistentDataContainer().persistentData.PlayerInfo.GUID == data.OwnerGUID)); }
public void RegisterAndLoginResponse(Message_ServerResponse_Register objData) { if (objData.succeded) { UnityConfig.GetPersistentDataContainer().SetProfile(objData); gUIHandler.SetUIState_MM(); } else { MM_GUIHandler.Instance.registerLogin_GuiHandler.SetPopupMessage(objData.message, true); } }
public void LoginResponse(Message_ServerResponse_Login objData) { if (objData.loginSucceded) { UnityConfig.GetPersistentDataContainer().SetProfile(objData); gUIHandler.SetUIState_MM(); } else { MM_GUIHandler.Instance.registerLogin_GuiHandler.SetPopupMessage("Login suceeded were " + objData.loginSucceded, true); } }
public void DBLogin(string username, string password) { ClientDBEventHandler clientDBEventHandler = new ClientDBEventHandler(); ILogger logger = new UnityLogger(); PersistentData data = UnityConfig.GetPersistentDataContainer().persistentData; dbClient = new DBClient(config, clientDBEventHandler, data, logger); Message_ClientRequest_Login msg = new Message_ClientRequest_Login() { name = username, password = password }; clientDBEventHandler.SendMessageOnConnectionSuccesfull(mM_GUIHandler, dbClient, msg); dbClient.Connect(); }