public void OnGameEnd(bool success) { if (((FWNetworkManager)FWNetworkManager.singleton).isServer) { NetworkTransfer.RpcGameEnd(success); } }
protected override void UpdateScene() { base.UpdateScene(); if (CurrentGameState == GameState.Running) { if (Hero != null && OtherPlayer != null) { if (Hero.IsDead && OtherPlayer.IsDead) { // 두번진입하지 않도록 강제로 게임종료 셋팅 NetworkTransfer.SetGameStateEnd(); OnGameEnd(false); } } } }
internal static void NC_USER_WORLDSELECT_REQ(NetworkMessage message, NetworkConnection connection) { var worldNo = message.ReadByte(); var world = ServerMain.Worlds.First(w => w.Number == worldNo); if (world == null) { new PROTO_NC_USER_LOGINFAIL_ACK(0x42).Send(connection); new PROTO_NC_LOG_USER_LOGINFAIL(connection.Account.Username, null, connection.GetRemoteIP, 0x42).Send(ServerMain.GameLogServer); return; } var transfer = new NetworkTransfer(connection.Account, connection.Guid) { Connection = connection, World = world }; ServerMain.Transfers.Add(transfer); new PROTO_NC_USER_WILLLOGIN_REQ(connection.Account, connection.Guid).Send(world.Connection); new PROTO_NC_LOG_USER_LOGIN(connection.Account.UserNo, worldNo, connection.GetRemoteIP).Send(ServerMain.GameLogServer); }
public void GameStart() { NetworkTransfer.RpcGameStart(); }
public void SetRunningState() { NetworkTransfer.RpcSetRunningState(); }
public void ShowWarningUI() { NetworkTransfer.RpcShowWarningUI(); }