public override void OnDialogStateEnter(PersistState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); Input.multiTouchEnabled = true;//忍刀 Init(); BaseDialogState.UICamera.clearFlags = CameraClearFlags.Depth; }
public override void OnDialogStateEnter(PersistState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); chapter = data as Chapter; model = data as ModelItem; Init(); }
public override void OnDialogStateEnter(BaseDialogState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); Close.onClick.AddListener(() => { OnPreviousPress(); }); DoScript.onClick.AddListener(() => { if (Main.Ins.CombatData.GLevelMode == LevelMode.MultiplyPlayer) { result.text = "联机禁用此功能"; return; } try { if (string.IsNullOrEmpty(scriptInput.text)) { result.text = "输入为空"; return; } if (!UseCheatCode(scriptInput.text)) { Main.Ins.ScriptMng.CallString(scriptInput.text); } result.text = "秘籍成功执行"; } catch (Exception exp) { result.text = "执行出错:" + exp.Message + "-" + exp.StackTrace; } }); }
public override void OnDialogStateEnter(BaseDialogState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); Init(); Close.onClick.AddListener(() => { OnBackPress(); }); loadModel = Main.Ins.StartCoroutine(LoadModels()); }
// Use this for initialization public override void OnDialogStateEnter(PersistState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); rect = GetComponent <RectTransform>(); owner = ownerState.Owner as MeteorUnit; Init(owner.Attr, owner.transform, owner.Camp); //rectCanvas = c.GetComponent<RectTransform>().sizeDelta; }
public override void OnDialogStateEnter(BaseDialogState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); Init(); if (ScriptInputDialogState.Exist()) { ScriptInputDialogState.State.Close(); } }
public virtual void OnDialogStateEnter(PersistState ownerState, BaseDialogState previousDialog, object data) { Persist = ownerState; if (FadeIn == FadeEffect.Scale) { transform.localScale = Vector3.zero; Tweener tweenScale = transform.DOScale(Vector3.one, duration); tweenScale.SetEase(Ease.InCubic); } }
public override void OnDialogStateEnter(BaseDialogState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); //Debug.Log("OnAdjustWndOpen"); Init(); if (NGUICameraJoystick.Ins != null) { NGUICameraJoystick.Ins.enabled = false; } }
public override void OnDialogStateEnter(PersistState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); Input.multiTouchEnabled = true;//忍刀 Init(); BaseDialogState.UICamera.clearFlags = CameraClearFlags.Depth; //如果使用鼠标。那么锁定鼠标 #if UNITY_ANDROID Cursor.lockState = GameStateMgr.Ins.gameStatus.UseMouse ? CursorLockMode.Locked : CursorLockMode.None; #endif }
public override void OnDialogStateEnter(BaseDialogState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); CombatData.Ins.Chapter = null; //进入主界面,创建全局 GameOverlayDialogState.State.Open(); Init(); Main.Ins.listener.enabled = true; menu.volume = GameStateMgr.Ins.gameStatus.MusicVolume; //每次进入主界面,触发一次更新APP信息的操作,如果 //Main.Ins.UpdateAppInfo(); }
public override void OnDialogStateEnter(BaseDialogState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); #if UNITY_ANDROID //AndroidWrapper.Init(); #elif UNITY_IOS //IosWrapper.Init(); #endif Main.Ins.ShowFps(GameStateMgr.Ins.gameStatus.ShowFPS); StartCoroutine(LoadData()); SoundManager.Ins.SetMusicVolume(GameStateMgr.Ins.gameStatus.MusicVolume); SoundManager.Ins.SetSoundVolume(GameStateMgr.Ins.gameStatus.SoundVolume); }
public override void OnDialogStateEnter(BaseDialogState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); Material loadingTexture = null; if (Main.Ins.CombatData.Chapter == null) { if (Main.Ins.CombatData.GLevelItem != null && !string.IsNullOrEmpty(Main.Ins.CombatData.GLevelItem.BgTexture)) { loadingTexture = GameObject.Instantiate(Resources.Load <Material>(Main.Ins.CombatData.GLevelItem.BgTexture)) as Material; } else { loadingTexture = GameObject.Instantiate(Resources.Load <Material>("Scene10")) as Material; } } else { for (int i = 0; i < Main.Ins.CombatData.Chapter.resPath.Length; i++) { if (Main.Ins.CombatData.Chapter.resPath[i].EndsWith(Main.Ins.CombatData.GLevelItem.BgTexture + ".jpg")) { byte[] array = System.IO.File.ReadAllBytes(Main.Ins.CombatData.Chapter.resPath[i]); Texture2D tex = new Texture2D(0, 0); tex.LoadImage(array); loadingTexture = GameObject.Instantiate(Resources.Load <Material>("Scene10")) as Material; loadingTexture.SetTexture("_MainTex", tex); loadingTexture.SetColor("_TintColor", Color.white); break; } } } if (loadingTexture != null) { ShowLoading.material = loadingTexture; } SetLoadingNoticeLabel(); mProgressBar.fillAmount = 0f; }
public override void OnDialogStateEnter(PersistState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); Close.onClick.AddListener(() => { OnPreviousPress(); }); DoScript.onClick.AddListener(() => { try { if (string.IsNullOrEmpty(scriptInput.text)) { result.text = "输入为空"; return; } result.text = "秘籍可查阅指令表"; if (!CheatCode.UseCheatCode(scriptInput.text)) { if (U3D.IsMultiplyPlayer()) { result.text = "联机时只支持部分指令"; } else { ScriptMng.Ins.CallString(scriptInput.text); } } else { result.text = "秘籍成功执行"; } } catch (Exception exp) { result.text = "执行出错:" + exp.Message + "-" + exp.StackTrace; } }); }
public override void OnDialogStateEnter(BaseDialogState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); Texture2D loadingTexture = null; if (CombatData.Ins.Chapter == null) { if (CombatData.Ins.GLevelItem != null && !string.IsNullOrEmpty(CombatData.Ins.GLevelItem.BgTexture)) { loadingTexture = GameObject.Instantiate(Resources.Load <Texture2D>(CombatData.Ins.GLevelItem.BgTexture)); } } else { for (int i = 0; i < CombatData.Ins.Chapter.resPath.Count; i++) { if (CombatData.Ins.Chapter.resPath[i].EndsWith(CombatData.Ins.GLevelItem.BgTexture + ".jpg")) { byte[] array = System.IO.File.ReadAllBytes(CombatData.Ins.Chapter.resPath[i]); Texture2D tex = new Texture2D(0, 0); tex.LoadImage(array); loadingTexture = tex; break; } } } if (loadingTexture != null) { ShowLoading.sprite = Sprite.Create(loadingTexture, new Rect(0, 0, loadingTexture.width, loadingTexture.height), Vector2.zero); //把这个图全屏拉大到画布大小 Utility.Expand(ShowLoading, loadingTexture.width, loadingTexture.height); ShowLoading.color = Color.white; } SetLoadingNoticeLabel(); mProgressBar.fillAmount = 0f; }
public override void OnDialogStateEnter(PersistState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); Init(data as string); }
public override void OnDialogStateEnter(BaseDialogState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); Init(); }
public override void OnDialogStateEnter(BaseDialogState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); Init(); RoomMng.Ins.SelectRoom(-1); }
public override void OnDialogStateEnter(BaseDialogState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); filter = data == null ? 0 : (int)data; Init(); }
public override void OnDialogStateEnter(BaseDialogState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); Notice.text = Main.Ins.GameNotice.notice; Close.onClick.AddListener(() => { OnBackPress(); }); }
public override void OnEnter(BaseDialogState previousState, object data) { base.OnEnter(previousState, data); UserPref.Ins.SetInt("AsRead", 1); read = 1; }
public override void OnDialogStateEnter(PersistState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); GameObject.DontDestroyOnLoad(gameObject); InsertSystemMsg("OK"); }
public override void OnDialogStateEnter(BaseDialogState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); singlePlayer = (bool)data; Init(); }
static bool watchAi = false;//是否在观察AI行为. public override void OnDialogStateEnter(BaseDialogState ownerState, BaseDialogState previousDialog, object data) { base.OnDialogStateEnter(ownerState, previousDialog, data); Init(); Main.Ins.GameBattleEx.Pause(); }