static public InputEventCtrl GetInstance() { if (Instance == null) { GameObject obj = new GameObject("_InputEventCtrl"); Instance = obj.AddComponent <InputEventCtrl>(); pcvr.GetInstance(); XKGlobalData.GetInstance(); SetPanelCtrl.GetInstance(); } return(Instance); }
/// <summary> /// 获取需要打印的彩票数量. /// </summary> public int GetPrintCaiPiaoValueByDeCaiState(DeCaiState type, SuiJiDaoJuState suiJiDaoJuType = SuiJiDaoJuState.BaoXiang) { int value = 0; int coinStart = XKGlobalData.GetInstance().m_CoinToCard *XKGlobalData.GameNeedCoin; switch (type) { case DeCaiState.ZhanChe: { if (XkGameCtrl.GetInstance().m_CaiPiaoMode == XkGameCtrl.CaiPiaoModeSuanFa.GuDing) { value = XkPlayerCtrl.GetInstanceFeiJi().m_SpawnNpcManage.m_CaiPiaoDataManage.m_GuDingBanCaiPiaoData.ZhanCheDeCai; } else { value = (int)(coinStart * ZhanCheChuPiaoTiaoJian); } break; } case DeCaiState.SuiJiDaoJu: { float suiJiDaoJuChuPiaoLv = 0f; SuiJiDaoJuData suiJiDaoJuData = XkPlayerCtrl.GetInstanceFeiJi().m_SpawnNpcManage.m_CaiPiaoDataManage.m_SuiJiDaoJuData; if (suiJiDaoJuType == SuiJiDaoJuState.TouZi) { suiJiDaoJuChuPiaoLv = suiJiDaoJuData.TouZiDePiaoLv; } else { suiJiDaoJuChuPiaoLv = suiJiDaoJuData.BaoXiangDePiaoLv; } value = (int)(coinStart * SuiJiDaoJuChuPiaoTiaoJian); //应该给玩家的彩票数量. value = (int)(value * suiJiDaoJuChuPiaoLv); break; } case DeCaiState.JPBoss: { if (XkGameCtrl.GetInstance().m_CaiPiaoMode == XkGameCtrl.CaiPiaoModeSuanFa.GuDing) { value = XkPlayerCtrl.GetInstanceFeiJi().m_SpawnNpcManage.m_CaiPiaoDataManage.m_GuDingBanCaiPiaoData.GetJPBossChuPiaoTiaoJian(); } else { value = (int)(coinStart * JPBossChuPiaoTiaoJian); } break; } } return(value); }
// Use this for initialization void Start() { _instance = this; XKGlobalData.GetInstance(); AudioListener.volume = (float)XKGlobalData.GameAudioVolume / 10f; if (AudioListCtrl.GetInstance() != null) { AudioListCtrl.GetInstance().CloseGameAudioBJ(); } Screen.showCursor = false; LoadingGameCtrl.ResetLoadingInfo(); Time.timeScale = 1.0f; AudioManager.Instance.SetParentTran(null); GameOverCtrl.IsShowGameOver = false; if (IsOpenFXZhenDong) { pcvr.OpenAllPlayerFangXiangPanPower(); } pcvr.CloseAllQiNangArray(PlayerEnum.Null, 1); //IsTestLJGame = true; //test //IsTestXiaoScreen = true; //test if (!XkGameCtrl.IsGameOnQuit) { if (!Screen.fullScreen || Screen.currentResolution.width != 1360 || Screen.currentResolution.height != 768) { if (!IsTestLJGame && !IsTestXiaoScreen) { Screen.SetResolution(1360, 768, true); } } } if (!IsTestLJGame) { IsActivePlayer = true; if (IsTestXiaoScreen) { Screen.SetResolution(680, 384, false); //test } } QualitySettings.SetQualityLevel((int)QualityLevelEnum.Fast); AudioSourceObj = transform.GetComponent <AudioSource>(); Invoke("DelayResetIsLoadingLevel", 4f); if (IsOpenFXZhenDong) { IsOpenFXZhenDong = false; Invoke("CloseAllFangXiangPanPower", 10f); } PlayMovie(); }
public void SetPlayerCoin(int coin) { XKGlobalData.GetInstance(); if (XKGlobalData.GameVersionPlayer != 0) { if (PlayerSt == PlayerEnum.PlayerOne || PlayerSt == PlayerEnum.PlayerTwo) { return; } } SetPlayerCoinSprite(coin); }
public void ClickSetMoveBt(ButtonState val) { if (ClickSetMoveBtEvent != null) { ClickSetMoveBtEvent(val); } if (val == ButtonState.DOWN) { XKGlobalData.PlayAudioSetMove(); } }
public void ShowGameMode() { if (IsShowGameMode) { return; } IsShowGameMode = true; // Debug.Log("show game mode selectPanel..."); XKGlobalData.GetInstance().PlayModeBeiJingAudio(); InputEventCtrl.GetInstance().ClickStartBtOneEvent += ClickFireBtOneEvent; InputEventCtrl.GetInstance().ClickStartBtTwoEvent += ClickFireBtTwoEvent; Invoke("DelayShowGameMode", 0.3f); }
public void ShowQuanBuTongGuan() { XKGlobalData.GetInstance().PlayAudioQuanBuTongGuan(); TweenPosition twPos = gameObject.AddComponent <TweenPosition>(); twPos.from = new Vector3(0f, 500f, 0f); twPos.to = Vector3.zero; twPos.duration = 0.5f; transform.localPosition = twPos.from; gameObject.SetActive(true); twPos.PlayForward(); Invoke("DelayCloseQuanBuTongGuan", 5f); }
void DelayActiveJiFenJieMian() { if (GameTimeBossCtrl.GetInstance() != null && GameTimeBossCtrl.GetInstance().GetTimeBossResidual() > 0) { XKGlobalData.GetInstance().PlayAudioBossShengLi(); } if (JiFenJieMianCtrl.GetInstance() != null) { JiFenJieMianCtrl.GetInstance().ActiveJiFenJieMian(); } }
/// <summary> /// 初始化彩票打印状态. /// </summary> void InitCaiPiaoPrintState() { XKGlobalData.CaiPiaoPrintState type = XKGlobalData.GetInstance().m_CaiPiaoPrintState; if (m_CaiPiaoBanPiao != null) { m_CaiPiaoBanPiao.SetActive(type == XKGlobalData.CaiPiaoPrintState.BanPiao ? true : false); } if (m_CaiPiaoQuanPiao != null) { m_CaiPiaoQuanPiao.SetActive(type == XKGlobalData.CaiPiaoPrintState.QuanPiao ? true : false); } }
/// <summary> /// 玩家投币时间响应. /// coin -> 玩家的总投币数. /// </summary> public void OnPlayerInsertCoin(pcvrTXManage.PlayerCoinEnum indexPlayerCoin, int coin) { int indexVal = (int)indexPlayerCoin; if (indexVal < 0 || indexVal > 2) { Debug.LogWarning("OnPlayerInsertCoin -> indexVal was wrong! indexVal ==== " + indexVal); return; } PlayerEnum indexPlayer = (PlayerEnum)(indexVal + 1); XKGlobalData.SetCoinPlayerInfo(indexPlayer, coin); }
// Use this for initialization void Start() { XKGlobalData.GetInstance(); if (XKGlobalData.GameVersionPlayer == 0) { return; } for (int i = 0; i < UITr.Length; i++) { UITr[i].localPosition = (Vector3)UIPos[i]; } }
void OnTriggerEnter(Collider other) { // Debug.Log("test---OnTriggerEnter -> Collider "+other.gameObject.name // +", IsSelectDanJiMode "+GameModeCtrl.IsSelectDanJiMode); if (Application.loadedLevel != (int)GameLevel.Movie) { return; } // if (GameModeCtrl.IsSelectDanJiMode) { // return; // } if (GameModeCtrl.GameModeState != 0) { return; } GameMoShiInfo script = other.GetComponent <GameMoShiInfo>(); if (script == null) { return; } // Debug.Log("OnTriggerEnter -> Collider "+other.gameObject.name); switch (script.AppModeVal) { case GameMode.LianJi: if (ZXModeVal != GameMode.LianJi) { GameMoShiInfo.InstanceLianJi.SetTransformScale(new Vector3(1.1f, 1.1f, 1f)); GameMoShiInfo.InstanceDanJi.SetTransformScale(new Vector3(1f, 1f, 1f)); GameModeCtrl.ModeVal = GameMode.LianJi; GameModeCtrl.GetInstance().SetActiveStartBt(true); XKGlobalData.GetInstance().PlayModeXuanZeAudio(); } break; default: if (ZXModeVal == GameMode.Null || ZXModeVal == GameMode.LianJi) { GameMoShiInfo.InstanceLianJi.SetTransformScale(new Vector3(1f, 1f, 1f)); GameMoShiInfo.InstanceDanJi.SetTransformScale(new Vector3(1.1f, 1.1f, 1f)); GameModeCtrl.ModeVal = GameMode.DanJiFeiJi; GameModeCtrl.GetInstance().SetActiveStartBt(true); XKGlobalData.GetInstance().PlayModeXuanZeAudio(); } break; } ZXModeVal = GameModeCtrl.ModeVal; }
void CheckGameBtEvent() { // if (!ModeObj.activeSelf) { // return; // } ModeVal = GameMode.LianJi; // if (ModeVal == GameMode.Null) { // return; // } // if (!StartBtObj.activeSelf) { // return; // } XKGlobalData.GetInstance().PlayModeQueRenAudio(); if (ModeVal != GameMode.LianJi) { IsSelectDanJiMode = true; HiddenGameMode(); if (NetCtrl.GetInstance() != null) { NetCtrl.GetInstance().SendSubLinkCount(); } GameTypeCtrl.SetAppTypeVal(AppGameType.LianJiFeiJi); NetworkServerNet.GetInstance().MakeServerDisconnect(); //Close ServerNet. NetworkServerNet.GetInstance().MakeClientDisconnect(); //Close ClientNet. SetActiveLoading(true); } else { IsSelectDanJiMode = false; // if (NetworkServerNet.GetInstance() != null) { // NetworkServerNet.GetInstance().TryToLinkServer(); // } if (NetCtrl.GetInstance() != null) { NetCtrl.GetInstance().SendAddLinkCount(); //ServerPort. } else { //ClientPort. IsActiveClientPort = true; HiddenGameMode(); GameTypeCtrl.SetAppTypeVal(AppGameType.LianJiFeiJi); SetActiveLoading(true); } } SetActiveStartBt(false); }
/// <summary> /// 初始化. /// </summary> internal void Init() { if (XKGlobalData.GetInstance().m_ShangHuDt == null) { int shangHuKey = (int)m_ShangHuInfo; GameShangHuData data = ReadShangHuConfigInfo(shangHuKey.ToString()); if (data == null) { data = new GameShangHuData(ShangHuInfo.ShangHu1, "888888", "海底捞火锅"); UnityLogWarning("not find game shangHu info!"); } XKGlobalData.GetInstance().m_ShangHuDt = data; } }
void Init() { string imgPath = XKGlobalData.GetInstance().GetLogoImgPath(); Texture img = (Texture)Resources.Load(imgPath); if (img != null) { UITexture uiTexture = GetComponent <UITexture>(); if (uiTexture != null) { uiTexture.mainTexture = img; } } }
public void ClickSetEnterBt(ButtonState val) { // SetEnterBtSt = val; if (ClickSetEnterBtEvent != null) { ClickSetEnterBtEvent(val); } if (val == ButtonState.DOWN) { XKGlobalData.PlayAudioSetEnter(); // TimeSetEnterMoveBt = Time.time; } pcvr.SetIsPlayerActivePcvr(); }
IEnumerator DelayActivePlayerToGame(XKPlayerMoveCtrl playerScript) { playerScript.SetIsActiveZhuiYa(true); XKGlobalData.GetInstance().PlayAudioXuanYaDiaoLuo(); XkGameCtrl.GetInstance().SubGamePlayerHealth(playerScript.PlayerIndex, PlayerDamage, true); if (!XkGameCtrl.GetIsActivePlayer(playerScript.PlayerIndex)) { playerScript.SetIsActiveZhuiYa(false); yield break; } yield return(new WaitForSeconds(TimeResetPlayer)); XkGameCtrl.ActivePlayerToGame(playerScript.PlayerIndex, true); playerScript.SetIsActiveZhuiYa(false); }
void HiddenLoadingGame() { if (Network.peerType == NetworkPeerType.Disconnected) { gameObject.SetActive(false); //XkPlayerCtrl.GetInstanceCartoon().DelayMoveCartoonCamera(); XKGlobalData.GetInstance().PlayGuanKaBeiJingAudio(); } // else { // StartCoroutine(CheckPlayerCountLoop()); // if (Network.peerType == NetworkPeerType.Client) { // NetCtrl.GetInstance().HandleLoadingGamePlayerCount(); // } // } }
void OnClickTiaoGuoBt() { XKGlobalData.GetInstance().PlayStartBtAudio(); HiddenTiaoGuoBt(); if (!JiFenJieMianCtrl.GetInstance().GetIsShowFinishTask()) { if (Network.peerType != NetworkPeerType.Server) { XKTriggerEndCartoon.GetInstance().CloseStartCartoon(); } } /*else { * JiFenJieMianCtrl.GetInstance().StopJiFenTime(); * }*/ }
void SetCoinToCardIndo(int cardVal) { int cardTmp = cardVal; if (cardTmp > 50) { cardTmp = 10; } //else //{ // cardTmp += 5; //} m_CoinToCardLB.text = cardTmp.ToString(); XKGlobalData.GetInstance().SetCoinToCardVal(cardTmp); }
void Start() { GameTextVal = XKGlobalData.GetGameTextMode(); //GameTextVal = GameTextType.English; //test ModeSprite = GetComponent <UISprite>(); switch (AppModeVal) { case GameMode.LianJi: InstanceLianJi = this; break; default: InstanceDanJi = this; break; } InitGameModeImg(); }
// Use this for initialization void Start() { if (XkGameCtrl.IsTiaoGuoStartCartoon) { HiddenLoadingGame(); return; } GameTextType gameTextVal = XKGlobalData.GetGameTextMode(); //gameTextVal = GameTextType.English; //test. switch (gameTextVal) { case GameTextType.Chinese: LoadText = LoadText_Ch; LoadImg = LoadImg_Ch; break; case GameTextType.English: LoadText = LoadText_En; LoadImg = LoadImg_En; break; } IsHiddenLoadingGame = false; int loadLevel = SceneManager.GetActiveScene().buildIndex - 1; if (XkGameCtrl.GetInstance().IsCartoonShootTest) { if (loadLevel < 1 || loadLevel > 6) { loadLevel = 1; } } LoadTextTextureCom.mainTexture = LoadText[loadLevel]; LoadImgTextureCom.mainTexture = LoadImg[loadLevel]; float timeVal = 0f; if (!XkGameCtrl.GetInstance().IsCartoonShootTest) { timeVal = 6f; } Invoke("HiddenLoadingGame", timeVal); }
// Use this for initialization void Start() { switch (PlayerSt) { case PlayerEnum.PlayerOne: _InstanceOne = this; XKGlobalData.SetCoinPlayerOne(XKGlobalData.CoinPlayerOne); InputEventCtrl.GetInstance().ClickStartBtOneEvent += ClickStartBtOneEvent; break; case PlayerEnum.PlayerTwo: _InstanceTwo = this; XKGlobalData.SetCoinPlayerTwo(XKGlobalData.CoinPlayerTwo); InputEventCtrl.GetInstance().ClickStartBtTwoEvent += ClickStartBtTwoEvent; break; case PlayerEnum.PlayerThree: _InstanceThree = this; XKGlobalData.SetCoinPlayerThree(XKGlobalData.CoinPlayerThree); InputEventCtrl.GetInstance().ClickStartBtThreeEvent += ClickStartBtThreeEvent; break; case PlayerEnum.PlayerFour: _InstanceFour = this; XKGlobalData.SetCoinPlayerFour(XKGlobalData.CoinPlayerFour); //InputEventCtrl.GetInstance().ClickStartBtFourEvent += ClickStartBtFourEvent; break; } SetGameNeedCoin(XKGlobalData.GameNeedCoin); SetActiveFreeMode(XKGlobalData.IsFreeMode); InsertCoinObj.SetActive(false); StartBtObj.SetActive(false); if (ZhunBeiZhanDou != null) { ZhunBeiZhanDou.SetActive(false); } switch (GameTypeCtrl.AppTypeStatic) { case AppGameType.LianJiServer: gameObject.SetActive(false); break; } SetActiveMianFeiTiYanUI(false); }
public void StartPlayDaoJiShi() { if (IsPlayDaoJishi) { return; } IsPlayDaoJishi = true; DaoJiShiCount = 9; DaoJiShiSprite.spriteName = "daoJiShi9"; DaoJiShiObj.SetActive(true); ContinueGameObj.SetActive(true); ShowDaoJiShiInfo(); XKGlobalData.GetInstance().StopAudioRanLiaoJingGao(); YouLiangCtrl.GetInstance().SetActiveYouLiangFlash(false); IsActivePlayerOne = XkGameCtrl.IsActivePlayerOne; IsActivePlayerTwo = XkGameCtrl.IsActivePlayerTwo; }
public void StartPlayBossLaiXi(SpawnNpcManage.NpcState type = SpawnNpcManage.NpcState.JPBoss, SSCaiPiaoDataManage.GameCaiPiaoData.DaiJinQuanState daiJinQuanType = SSCaiPiaoDataManage.GameCaiPiaoData.DaiJinQuanState.ZhanCheDaiJinQuan_01) { //Debug.Log("Unity:"+"StartPlayBossLaiXi..."); //BossZuDangCtrl.GetInstance().SetIsActiveBossZuDang(true); TimeLastBossLX = Time.time; XKGlobalData.GetInstance().PlayAudioBossLaiXi(); SetShangJiaInfo(type, daiJinQuanType); gameObject.SetActive(true); if (m_GameNumUI != null) { if (XkPlayerCtrl.GetInstanceFeiJi() != null && XkPlayerCtrl.GetInstanceFeiJi().m_SpawnNpcManage != null && XkPlayerCtrl.GetInstanceFeiJi().m_SpawnNpcManage.m_CaiPiaoDataManage != null && XkPlayerCtrl.GetInstanceFeiJi().m_SpawnNpcManage.m_CaiPiaoDataManage.m_GameCaiPiaoData != null) { int jpBossDaiJinQuan = 200; switch (type) { case SpawnNpcManage.NpcState.JPBoss: { jpBossDaiJinQuan = (int)XkPlayerCtrl.GetInstanceFeiJi().m_SpawnNpcManage.m_CaiPiaoDataManage.m_GameCaiPiaoData.JPBossDaiJinQuan; break; } case SpawnNpcManage.NpcState.ZhanChe: { if (daiJinQuanType == SSCaiPiaoDataManage.GameCaiPiaoData.DaiJinQuanState.ZhanCheDaiJinQuan_01) { jpBossDaiJinQuan = (int)XkPlayerCtrl.GetInstanceFeiJi().m_SpawnNpcManage.m_CaiPiaoDataManage.m_GameCaiPiaoData.ZhanCheDaiJinQuan_01; } else if (daiJinQuanType == SSCaiPiaoDataManage.GameCaiPiaoData.DaiJinQuanState.ZhanCheDaiJinQuan_02) { jpBossDaiJinQuan = (int)XkPlayerCtrl.GetInstanceFeiJi().m_SpawnNpcManage.m_CaiPiaoDataManage.m_GameCaiPiaoData.ZhanCheDaiJinQuan_02; } break; } } //SSDebug.Log("StartPlayBossLaiXi -> jpBossDaiJinQuan ======================== " + jpBossDaiJinQuan); m_GameNumUI.ShowNumUI(jpBossDaiJinQuan); } } }
void OnGUI() { float width = Screen.width - 20f; float hight = 25f; string info = "gameCaiPiaoInfo: "; //一币兑换彩票数. info += "coinToCard == " + XKGlobalData.GetInstance().m_CoinToCard; //战车彩池数据. int zhanCheJiangChi = XkPlayerCtrl.GetInstanceFeiJi().m_SpawnNpcManage.m_CaiPiaoDataManage.m_GameCaiPiaoData.ZhanCheDeCai; info += ", zhanCheJiangChi == " + zhanCheJiangChi; //JPBoss彩池数据. int jpBossJiangChi = XkPlayerCtrl.GetInstanceFeiJi().m_SpawnNpcManage.m_CaiPiaoDataManage.m_GameCaiPiaoData.JPBossDeCai; info += ", jpBossJiangChi == " + jpBossJiangChi; //随机道具彩池数据. int daoJuJiangChi = XkPlayerCtrl.GetInstanceFeiJi().m_SpawnNpcManage.m_CaiPiaoDataManage.m_GameCaiPiaoData.SuiJiDaoJuDeCai; info += ", daoJuJiangChi == " + daoJuJiangChi; //预制彩池数据. int yuZhiJiangChi = XkPlayerCtrl.GetInstanceFeiJi().m_SpawnNpcManage.m_CaiPiaoDataManage.m_GameYuZhiCaiPiaoData.YuZhiCaiPiaoVal; info += ", yuZhiJiangChi == " + yuZhiJiangChi; //总投币数据. int value = XKGlobalData.GetInstance().m_TotalInsertCoins; info += ", TotalInsertCoins == " + value; //总出票数据. value = XKGlobalData.GetInstance().m_TotalOutPrintCards; info += ", TotalOutPrintCards == " + value; //info = "bufLen == " + info.Length + ", " + info; if (width < info.Length * 8f) { //动态修改高度. hight = ((info.Length * 8f) / width) * hight; } Rect rect = new Rect(10f, 10f, width, hight); GUI.Box(rect, ""); GUI.Label(rect, info); }
void CheckGameBtEvent() { if (!ModeObj.activeSelf) { return; } if (ModeVal == GameMode.Null) { return; } if (!StartBtObj.activeSelf) { return; } XKGlobalData.GetInstance().PlayModeQueRenAudio(); if (ModeVal != GameMode.LianJi) { IsSelectDanJiMode = true; HiddenGameMode(); if (NetCtrl.GetInstance() != null) { NetCtrl.GetInstance().SendSubLinkCount(); } NetworkServerNet.GetInstance().MakeClientDisconnect(); //Close ClientNet SetActiveLoading(true); } else { IsSelectDanJiMode = false; if (NetworkServerNet.GetInstance() != null) { NetworkServerNet.GetInstance().TryToLinkServer(); } if (NetCtrl.GetInstance() != null) { NetCtrl.GetInstance().SendAddLinkCount(); } } SetActiveStartBt(false); }
// Use this for initialization void Start() { XKGlobalData.GetInstance(); if (XKGlobalData.GameVersionPlayer == 0) { return; } for (int i = 0; i < UItextureGm.Length; i++) { UItextureGm[i].mainTexture = TextureGm[i]; } for (int i = 0; i < MeshRd.Length; i++) { //MeshRd[i].materials[IndexMaterial[i]] = MaterialAy[i]; MeshRd[i].material = MaterialAy[i]; } }
public void ClickSetEnterBt(ButtonState val) { #if !UNITY_EDITOR SetEnterBtSt = val; #endif if (ClickSetEnterBtEvent != null) { ClickSetEnterBtEvent(val); } if (val == ButtonState.DOWN) { XKGlobalData.PlayAudioSetEnter(); #if !UNITY_EDITOR TimeSetEnterMoveBt = Time.time; #endif } pcvr.SetIsPlayerActivePcvr(); }
/// <summary> /// 获取登录游戏的玩家是否可以免费试玩游戏. /// </summary> bool GetLoginPlayerIsCanFreePlayGame(int userId) { bool isCanFreePlayGame = false; FreePlayGamePlayerData playerDt = m_FreePlayGamePlayerDataList.Find((dt) => { return(dt.UserId.Equals(userId)); }); if (playerDt == null) { //可以免费试玩游戏. isCanFreePlayGame = true; } else { //数据列表里有玩家的记录信息. System.DateTime timeNow = System.DateTime.Now; System.DateTime timeRecord = playerDt.TimeVal; System.TimeSpan ts1 = new System.TimeSpan(timeNow.Ticks); System.TimeSpan ts2 = new System.TimeSpan(timeRecord.Ticks); System.TimeSpan ts = ts2.Subtract(ts1).Duration(); //int dTime = ts.Hours * 3600 + ts.Minutes * 60 + ts.Seconds; int dTime = (int)ts.TotalSeconds; int minTime = XKGlobalData.GetInstance().m_TimeMianFeiNum * 60; //秒. if (dTime > minTime) { //playerDt.TimeVal = System.DateTime.Now; //时间差值大于免费间隔时间后,可以被激活. //可以免费试玩游戏. isCanFreePlayGame = true; } //SSDebug.LogWarning("GetLoginPlayerIsCanFreePlayGame -> dTime =============== " + dTime + "s"); } //yyyy - MM - dd hh: mm: ss //System.DateTime t1 = System.DateTime.Now; //System.DateTime t2 = System.Convert.ToDateTime("2019-01-07 13:45:10"); //System.TimeSpan ts11 = new System.TimeSpan(t1.Ticks); //System.TimeSpan ts21 = new System.TimeSpan(t2.Ticks); //System.TimeSpan ts00 = ts21.Subtract(ts11).Duration(); //int dTime11 = ts00.Hours * 3600 + ts00.Minutes * 60 + ts00.Seconds; //SSDebug.Log("GetLoginPlayerIsCanFreePlayGame -> dTime =============== " + dTime11 + "s"); return(isCanFreePlayGame); }