private void PreparePlayerDatas(GameFoundNotification gameNotification) { logicController.playersDataController.DeckSize = gameNotification.PlayersDeckSize; logicController.playersDataController.Health = gameNotification.PlayersHealth; logicController.playersDataController.Mana = 0; logicController.playersDataController.HandSize = 0; logicController.enemiesDataController.DeckSize = gameNotification.EnemiesDeckSize; logicController.enemiesDataController.Health = gameNotification.EnemiesHealth; logicController.enemiesDataController.Mana = 0; logicController.enemiesDataController.HandSize = 0; }
private void Start() { UserInfo userInfo = globalReference.UserInfoContainer.UserInfo; GameFoundNotification gameNotification = globalReference.GameFoundNotification; //UserInfo userInfo = GetDummyUserInfo(); //GameFoundNotification gameNotification = GetDummyNotification(); PrepareNameTags(userInfo, gameNotification.EnemyInfo); PreparePlayerDatas(gameNotification); //Application.Quit(); NotifyReadyStatus(); }
public override void FindGame(IRpcController controller, FindGameRequest request, Action <FindGameResponse> done) { FindGameResponse.Builder findGameResponse = FindGameResponse.CreateBuilder(); findGameResponse.SetRequestId(12526585062881647236); done(findGameResponse.Build()); client.ListenerId = request.ObjectId; GameFoundNotification.Builder gameFoundNotification = GameFoundNotification.CreateBuilder(); GameHandle.Builder gameHandle = GameHandle.CreateBuilder(); gameHandle.SetFactoryId(request.FactoryId); gameHandle.SetGameId(EntityId.CreateBuilder().SetHigh(433661094641971304).SetLow(11017467167309309688).Build()); ConnectInfo.Builder connectInfo = ConnectInfo.CreateBuilder(); connectInfo.SetToonId(new EntityId.Builder { High = HighId.Toon, Low = 2 }.Build()); connectInfo.SetHost("127.0.0.1"); connectInfo.SetPort(6665); connectInfo.SetToken(ByteString.CopyFrom(new byte[] { 0x07, 0x34, 0x02, 0x60, 0x91, 0x93, 0x76, 0x46, 0x28, 0x84 })); connectInfo.AddAttribute(Attribute .CreateBuilder() .SetName("SGameId") .SetValue(Variant .CreateBuilder() .SetIntValue(2014314530) .Build()) .Build()); gameFoundNotification.SetRequestId(12526585062881647236); gameFoundNotification.SetGameHandle(gameHandle.Build()); gameFoundNotification.AddConnectInfo(connectInfo.Build()); GameFactorySubscriber.CreateStub(client).NotifyGameFound(controller, gameFoundNotification.Build(), r => { }); }
private void HandleGameFoundNotification(GameFoundNotification notification) { globalReference.GameFoundNotification = notification; globalReference.SceneController.LoadScene("GameScene"); }
public override void NotifyGameFound(Google.ProtocolBuffers.IRpcController controller, GameFoundNotification request, Action <bnet.protocol.NO_RESPONSE> done) { throw new NotImplementedException(); }
public override void NotifyGameFound(Google.ProtocolBuffers.IRpcController controller, GameFoundNotification request, Action<bnet.protocol.NO_RESPONSE> done) { throw new NotImplementedException(); }