void ShowGameMovieLogo() { int indexMVLG = 0; float swTmp = (float)Screen.width / 3f; AppGameType gameType = GameTypeCtrl.AppTypeStatic; switch (gameType) { case AppGameType.LianJiFeiJi: case AppGameType.LianJiTanKe: case AppGameType.LianJiServer: indexMVLG = 2; break; case AppGameType.DanJiFeiJi: indexMVLG = 1; break; case AppGameType.DanJiTanKe: indexMVLG = 0; break; } if (!IsThreeScreenGame) { GUI.DrawTexture(new Rect(0f, 0f, Screen.width, Screen.height), TextureMvEnd[indexMVLG]); } else { GUI.DrawTexture(new Rect(0f, 0f, swTmp, Screen.height), TextureMvEnd[indexMVLG]); GUI.DrawTexture(new Rect(swTmp, 0f, swTmp, Screen.height), TextureMvEnd[indexMVLG]); GUI.DrawTexture(new Rect(swTmp * 2f, 0f, swTmp, Screen.height), TextureMvEnd[indexMVLG]); } }
void Awake() { Instance = this; pcvr.TKMoveSt = TKMoveSt; IsSetTKMoveSt = true; AppTypeStatic = AppType; if (AppType == AppGameType.LianJiServer) { IsServer = true; } }
public static void SetAppTypeVal(AppGameType val) { AppTypeStatic = val; switch (val) { case AppGameType.LianJiServer: IsServer = true; break; default: IsServer = false; break; } }
public static void SetAppTypeVal(AppGameType val) { switch (val) { case AppGameType.LianJiServer: IsServer = true; break; default: IsServer = false; val = IsTankVRStatic == true ? AppGameType.LianJiTanKe : AppGameType.LianJiFeiJi; break; } AppTypeStatic = val; }
void SetGameWindowToTop() { string appName = "HelicopterVR"; AppGameType gameType = GameTypeCtrl.AppTypeStatic; switch (gameType) { case AppGameType.LianJiTanKe: case AppGameType.DanJiTanKe: appName = "TankVR"; break; } IntPtr hwnd = FindWindow(null, appName); SetForegroundWindow(hwnd); }
void Awake() { Instance = this; switch (AppType) { case AppGameType.DanJiFeiJi: case AppGameType.LianJiFeiJi: MyCOMDevice.PcvrComSt = PcvrComState.TanKeGunZhenDong; IsZuoBiaoFanZhuanPY = true; PcvrGameSt = PcvrComState.TanKeFangXiangZhenDong; GameTKPMState = PcvrComState.TanKeFangXiangZhenDong; break; case AppGameType.DanJiTanKe: case AppGameType.LianJiTanKe: if (!pcvr.IsComTankTest) { MyCOMDevice.PcvrComSt = PcvrComState.TanKeFangXiangZhenDong; } IsZuoBiaoFanZhuanPY = AppType == AppGameType.DanJiTanKe ? true : false; PcvrGameSt = AppType == AppGameType.DanJiTanKe ? PcvrComState.TanKeFangXiangZhenDong : PcvrComState.TanKeGunZhenDong; GameTKPMState = AppType == AppGameType.DanJiTanKe ? GameTKPMState : PcvrComState.TanKeGame2Ping; break; } GameTKPMStatic = GameTKPMState; MyCOMDevice.PcvrGameSt = PcvrGameSt; pcvr.IsFanZhuanZuoBiaoPY = IsZuoBiaoFanZhuanPY; AppType = AppType == AppGameType.Null ? AppGameType.LianJiServer : AppType; if (!pcvr.bIsHardWare && DaoJiShiCtrl.IsTestActivePlayer) { string gameType = HandleJson.GetInstance().ReadFromFilePathXml(TestGameFile, "gameType"); if (gameType == null || gameType == "") { gameType = "0"; HandleJson.GetInstance().WriteToFilePathXml(TestGameFile, "gameType", gameType); } switch (gameType) { case "0": AppType = AppGameType.LianJiTanKe; break; case "1": AppType = AppGameType.LianJiFeiJi; break; case "2": AppType = AppGameType.LianJiServer; break; case "3": AppType = AppGameType.DanJiTanKe; break; case "4": AppType = AppGameType.DanJiFeiJi; break; } //Debug.Log("appType "+AppType+", gameType "+gameType); } AppTypeStatic = AppType; if (AppType == AppGameType.LianJiServer) { IsServer = true; DelayCheckServerIP(); } }