void CallGameChangeJiaoZhunPic() { //通知游戏更新校准图片信息. if (SetPanelCtrl.GetInstance() != null) { SetPanelCtrl.GetInstance().ChangeIndexCrossJZ(); } }
static public SetPanelCtrl GetInstance() { if (Instance == null) { GameObject obj = new GameObject("_SetPanelCtrl"); Instance = obj.AddComponent <SetPanelCtrl>(); } return(Instance); }
static public InputEventCtrl GetInstance() { if (Instance == null) { GameObject obj = new GameObject("_InputEventCtrl"); Instance = obj.AddComponent <InputEventCtrl>(); pcvr.GetInstance(); XKGlobalData.GetInstance(); SetPanelCtrl.GetInstance(); } return(Instance); }
static public InputEventCtrl GetInstance() { if (Instance == null) { PcvrComInputEvent pcvrComInput = PcvrComInputEvent.GetInstance(); GameObject obj = pcvrComInput.gameObject; Instance = obj.AddComponent <InputEventCtrl>(); XKGlobalData.GetInstance(); SetPanelCtrl.GetInstance(); } return(Instance); }
static public SetPanelCtrl GetInstance() { if (Instance == null) { GameObject obj = new GameObject("_SetPanelCtrl"); //DontDestroyOnLoad(obj); Instance = obj.AddComponent <SetPanelCtrl>(); if (!FreeModeCtrl.IsServer) { pcvr.GetInstance(); } FramesPerSecond.GetInstance(); ScreenLog.init(); } return(Instance); }
static public SetPanelCtrl GetInstance() { if (Instance == null) { GameObject obj = new GameObject("_SetPanelCtrl"); //DontDestroyOnLoad(obj); Instance = obj.AddComponent <SetPanelCtrl>(); pcvr.GetInstance(); //if (Application.loadedLevel == (int)GameLeve.Movie) { // NetworkServerNet.GetInstance(); //} ScreenLog.init(); } return(Instance); }
void Start() { _Instance = this; LinkPlayerObj.SetActive(false); backgroudSprite = BackgroudObj.GetComponent <UISprite>(); backgroudScl = BackgroudObj.GetComponent <TweenScale>(); backgroudColor = BackgroudObj.GetComponent <TweenColor>(); backgroudScl.enabled = false; backgroudColor.enabled = false; ModeObj.transform.localPosition = new Vector3(-1258f, 0f, 0f); ModeObj.SetActive(false); StartBtObj.SetActive(false); ActiveJiaShi.SetActive(false); CenterObj.SetActive(false); LinkTScl_0 = LinkObj.GetComponents <TweenScale>()[0]; LinkTScl_1 = LinkObj.GetComponents <TweenScale>()[1]; DanJiTScl_0 = DanJiObj.GetComponents <TweenScale>()[0]; DanJiTScl_1 = DanJiObj.GetComponents <TweenScale>()[1]; LinkSprite = LinkObj.GetComponent <UISprite>(); DanJiSprite = DanJiObj.GetComponent <UISprite>(); MovieObj.SetActive(true); InitSprite(); //GlobalData.GetInstance().IcoinCountChange += IcoinCountChange; ConvertNumToImg("xu", GlobalData.GetInstance().XUTOUBI); ConvertNumToImg("yi", GlobalData.GetInstance().Icoin); audioTouBiStatic = AudioListCtrl.GetInstance().AudioTouBi; ShowInsertCoinImg(); //Toubi.PlayerPushCoin( 10 ); //test InputEventCtrl.GetInstance().ClickStartBtOneEvent += clickStartBtOneEvent; InputEventCtrl.GetInstance().ClickStartBtTwoEvent += clickStartBtTwoEvent; SetPanelCtrl.GetInstance(); FinishPanelCtrl.IsCanLoadSetPanel = true; //reset IsCanLoadSetPanel }
// Use this for initialization void Start() { _Instance = this; IsStopMoveAiPlayer = false; if (PlayerShootNpc_2 < PlayerShootNpc_1) { Debug.LogError("PlayerShootNpc_1 and PlayerShootNpc_2 was wrong!"); PlayerTran.name = "null"; } if (PlayerHitZhangAi_2 < PlayerHitZhangAi_1) { Debug.LogError("PlayerHitZhangAi_1 and PlayerHitZhangAi_2 was wrong!"); PlayerTran.name = "null"; } AudioHitBt = AudioListCtrl.GetInstance().AudioStartBt; AudioManager.Instance.PlayBGM(AudioListCtrl.GetInstance().AudioGameBeiJing, true); if (GlobalData.GetInstance().gameMode == GameMode.SoloMode) { //DanJiXueTiaoEng = XueTiaoEngCtrl.GetInstance().GetXueTiaoEngSprite(); //InitDanJiXueTiaoEng(); //WaterwheelPlayerCtrl.PlayerZhuanXiangVal = PlayerZhuanXiangVal; HeadCtrlPlayer.GetInstanceP1().StopColor(); StartBtCtrl.GetInstanceP2().CloseStartBtCartoon(); HeadCtrlPlayer.GetInstanceP2().SetHeadColor(); if (!GlobalData.GetInstance().IsFreeMode) { if (GlobalData.GetInstance().Icoin >= GlobalData.GetInstance().XUTOUBI) { StartBtCtrl.GetInstanceP2().InitStartBtCartoon(); } else { InsertCoinCtrl.GetInstanceP2().ShowInsertCoin(); } } else { StartBtCtrl.GetInstanceP2().InitStartBtCartoon(); } ShowAllCameras(); //InvokeRepeating("LoopSubXueTiao", 3f, 100f); //test //InitFillPlayerBlood(); //test } else { /*if (NetworkRpcMsgCtrl.MaxLinkServerCount > 0 && NetworkRpcMsgCtrl.MaxLinkServerCount != NetworkRpcMsgCtrl.NoLinkClientCount) { * CloseAllCameras(); * } * else { * ShowAllCameras(); * }*/ //WaterwheelPlayerNetCtrl.PlayerZhuanXiangVal = PlayerZhuanXiangVal; HeadCtrlPlayer.GetInstanceP1().StopColor(); StartBtCtrl.GetInstanceP2().CloseStartBtCartoon(); HeadCtrlPlayer.GetInstanceP2().SetHeadColor(); if (!GlobalData.GetInstance().IsFreeMode) { if (GlobalData.GetInstance().Icoin >= GlobalData.GetInstance().XUTOUBI) { StartBtCtrl.GetInstanceP2().InitStartBtCartoon(); } else { InsertCoinCtrl.GetInstanceP2().ShowInsertCoin(); } } else { StartBtCtrl.GetInstanceP2().InitStartBtCartoon(); } } SetPanelCtrl.GetInstance(); PlayerAutoFire.ResetPlayerHitZhangAiNum(); PlayerAutoFire.ResetPlayerShootNpcNum(); //QueryLinkIp.GetInstance().CheckLinkIpArray(); //TestIpLink(); CancelInvoke("FreeMemory"); InvokeRepeating("FreeMemory", 30000f, 10000f); }
// Use this for initialization void Awake() { IsTestXiaoScreen = pcvr.IsTestXiaoScreen; pcvr.ResetBikeZuLiInfo(); if (!IsServerPort) { int screenW = GetSystemMetrics(SM_CXSCREEN); if (screenW != ClientScreenW) { ClientScreenW = screenW; } if (!IsShowScreenInfo) { IsShowScreenInfo = true; Debug.Log("ClientScreenW " + ClientScreenW); } } ChangeMode.IsClickModeStart = false; CheckIsHavePlayerIp(); //pcvr.ResetPlayerBianMaQiMaxVal(); CountOpenServer++; // TimeClientFullScreen = Time.realtimeSinceStartup; ServerIpInfo = NetworkServerNet.ServerPortIP; if (!pcvr.bIsHardWare) { ServerIpInfo = NetworkServerNet.GetServerPortIp(); } // if (IsServerPort && CountOpenServer == 1) { // if (ServerIpInfo == Network.player.ipAddress) { // Invoke("OpenGameClientPort", 15f); // } // else { // Application.Quit(); // OpenGameClientPort(); // } // } //if (IsServerPort && (!pcvr.bIsHardWare || pcvr.IsTestGetInput)) { //IsTestXiaoScreen = true; //test //} pcvr.CloseGameDongGan(); QualitySettings.SetQualityLevel((int)QualityLevelGame.Good); if (RootObj == null) { gameObject.SetActive(false); } if (Application.loadedLevel > (int)GameLeve.Movie && GlobalData.GetInstance().IsFreeMode) { gameObject.SetActive(true); } Screen.showCursor = false; if (!IsRecordServerInfo) { IsRecordServerInfo = true; IsServer = IsServerPort; if (IsServer) { pcvr.bIsHardWare = false; } if (!IsServer) { if (!IsTestXiaoScreen) { if ((CountOpenServer == 1 && GlobalData.GetInstance().LinkModeState == 0 && ServerIpInfo == Network.player.ipAddress) || (CountOpenServer == 1 && GlobalData.GetInstance().LinkModeState == 1)) { if (IsHavePlayerIp) { Screen.SetResolution(ClientScreenW, 768, false); ChangeClientPortWindow(); } } } else { Screen.SetResolution(680, 384, false); } if (pcvr.bIsHardWare) { pcvr.CloseFangXiangPanPower(); } } else { //Screen.fullScreen = false; if (RootObj != null) { RootObj.SetActive(false); } ChangeWindowPos(); DelayCheckServerIP(); } } SetPanelCtrl.GetInstance(); GameTextType gameTextVal = GlobalData.GetGameTextMode(); //GlobalData.GetInstance().IsFreeMode = true; //test if (GlobalData.GetInstance().IsFreeMode) { if (Application.loadedLevel > (int)GameLeve.Movie && GlobalData.GetInstance().IsFreeMode) { if (gameTextVal == GameTextType.Chinese) { UiSpriteObj.spriteName = "mianFei"; } else { UiSpriteObj.spriteName = "mianFei_En"; } gameObject.SetActive(true); } else { if (gameTextVal == GameTextType.Chinese) { UiSpriteObj.spriteName = "Free"; } else { UiSpriteObj.spriteName = "Free_En"; } } CointInfo.SetActive(false); if (Application.loadedLevel == (int)GameLeve.Movie) { StartBtObj.SetActive(true); pcvr.StartLightStateP1 = LedState.Shan; } } else { if (Application.loadedLevel > (int)GameLeve.Movie && GlobalData.GetInstance().IsFreeMode) { if (gameTextVal == GameTextType.Chinese) { UiSpriteObj.spriteName = "qingTouBi"; } else { UiSpriteObj.spriteName = "qingTouBi_En"; } } else { if (gameTextVal == GameTextType.Chinese) { UiSpriteObj.spriteName = "PushCoin"; } else { UiSpriteObj.spriteName = "PushCoin_En"; } } CointInfo.SetActive(true); StartBtObj.SetActive(false); pcvr.StartLightStateP1 = LedState.Mie; if (Application.loadedLevel != (int)GameLeve.Movie) { gameObject.SetActive(false); } } InputEventCtrl.GetInstance().ClickStartBtEvent += clickStartBtEvent; }
// Use this for initialization void Start() { _Instance = this; JiaoZhunCrossImg.enabled = false; }