private void Awake() { line.sizeDelta = new Vector2(line.sizeDelta.x, GameVO.Instance.PixelHeight * GameVO.Instance.scale); UIFix.SetDistanceToBottom(hitEffect); ButtonClick.dispatcher.AddListener("quitSetting", OnQuit); ButtonClick.dispatcher.AddListener("zh_cn", OnZhCn); ButtonClick.dispatcher.AddListener("en_us", OnEnUs); ButtonClick.dispatcher.AddListener("zh_tw", OnZhTw); ButtonClick.dispatcher.AddListener("ja_jp", OnJaJp); ButtonClick.dispatcher.AddListener("ko_kr", OnKoKr); ButtonClick.dispatcher.AddListener("de_de", OnDeDe); ButtonClick.dispatcher.AddListener("es_la", OnEsLa); GameVO.Instance.language.AddListener(lib.Event.CHANGE, OnChange); ButtonClick.dispatcher.AddListener("music", OnClickMusic); ButtonClick.dispatcher.AddListener("musicPlus", OnClickMusicPlus); ButtonClick.dispatcher.AddListener("musicReduce", OnClickMusicReduce); GameVO.Instance.musicEditor.AddListener(lib.Event.CHANGE, OnMusicEditorChange); GameVO.Instance.musicVolumn.AddListener(lib.Event.CHANGE, OnMusicVolumnChange); ButtonClick.dispatcher.AddListener("sound", OnClickSound); ButtonClick.dispatcher.AddListener("soundPlus", OnClickSoundPlus); ButtonClick.dispatcher.AddListener("soundReduce", OnClickSoundReduce); GameVO.Instance.soundEditor.AddListener(lib.Event.CHANGE, OnSoundEditorChange); GameVO.Instance.soundVolumn.AddListener(lib.Event.CHANGE, OnSoundVolumnChange); }
private void Awake() { line.sizeDelta = new Vector2(line.sizeDelta.x, GameVO.Instance.PixelHeight * GameVO.Instance.scale); UIFix.SetDistanceToBottom(line); UIFix.SetDistanceToBottom(hit1); ButtonClick.dispatcher.AddListener("quitResult", OnQuit); ButtonClick.dispatcher.AddListener("home", OnShowHome); ButtonClick.dispatcher.AddListener("next", OnNext); }
private void Awake() { UIFix.SetDistanceToTop(title); UIFix.SetDistanceToBottom(hex2); hexjig.Start.backgroundInstance.bposition = 0.57f; hexjig.Start.backgroundInstance.brotation = -18; ButtonClick.dispatcher.AddListener("daily", OnShowDaily); ButtonClick.dispatcher.AddListener("freedom", OnShowFreedom); ButtonClick.dispatcher.AddListener("setting", OnShowSetting); ButtonClick.dispatcher.AddListener("shop", OnShowShop); ButtonClick.dispatcher.AddListener("favriate", OnLoginTest); ButtonClick.dispatcher.AddListener("honor", OnShowHonor); }
private void Awake() { line2.sizeDelta = new Vector2(line2.sizeDelta.x, GameVO.Instance.PixelHeight * GameVO.Instance.scale); UIFix.SetDistanceToTop(hex); UIFix.SetDistanceToTop(line1); UIFix.SetDistanceToTop(line2); line2.localPosition = new Vector3(line2.localPosition.x, line2.localPosition.y - GameVO.Instance.PixelHeight * GameVO.Instance.scale * 0.5f + 1280 * 0.5f); UIFix.SetDistanceToTop(quit); UIFix.SetDistanceToTop(hit1); UIFix.SetDistanceToBottom(hit2); ButtonClick.dispatcher.AddListener("quitFreedom", OnQuit); ButtonClick.dispatcher.AddListener("easy", OnEasy); ButtonClick.dispatcher.AddListener("normal", OnNormal); ButtonClick.dispatcher.AddListener("hard", OnHard); }
private void Awake() { UIFix.SetDistanceToTop(hex); UIFix.SetDistanceToBottom(hit1); line.sizeDelta = new Vector2(line.sizeDelta.x, GameVO.Instance.PixelHeight * GameVO.Instance.scale); ButtonClick.dispatcher.AddListener("quitDaily", OnQuit); foreach (RectTransform child in buttonsTransform) { if (StringUtils.Slice(child.gameObject.name, 0, "level".Length) == "level") { ButtonClick.dispatcher.AddListener(child.gameObject.name, OnClickLevel); foreach (RectTransform child2 in child.transform) { if (child2.gameObject.name == "txt") { txts.Add(child2.gameObject.GetComponent <Text>()); } if (child2.gameObject.name == "time") { times.Add(child2.gameObject.GetComponent <Text>()); } if (child2.gameObject.name == "icon") { icons.Add(child2.gameObject.GetComponent <Image>()); } if (child2.gameObject.name == "lock") { locks.Add(child2.gameObject); } } animations.Add(child.GetComponent <DOTweenAnimation>()); } } txts.Reverse(); times.Reverse(); icons.Reverse(); locks.Reverse(); animations.Reverse(); GameVO.Instance.daily.progress.AddListener(lib.Event.CHANGE, OnDailyProgressChange); }
private void Awake() { UIFix.SetDistanceToTop(line2.rectTransform); UIFix.SetDistanceToTop(hit2); UIFix.SetDistanceToTop(quit); UIFix.SetDistanceToBottom(line1.rectTransform); UIFix.SetDistanceToBottom(hit1); animations = GetComponentsInChildren <DOTweenAnimation>(); for (int i = 0; i < animations.Length; i++) { if (animations[i].id == "coin") { coinAnimation = animations[i]; shopEffectGap = 120; break; } } }
// Use this for initialization void Start() { border1.sizeDelta = new Vector2(border1.sizeDelta.x, GameVO.Instance.PixelHeight * GameVO.Instance.scale); border2.sizeDelta = new Vector2(border1.sizeDelta.x, GameVO.Instance.PixelHeight * GameVO.Instance.scale); UIFix.SetDistanceToBottom(border3); UIFix.SetDistanceToTop(border4); backgrodunEffect.transform.localPosition = new Vector3(0, -GameVO.Instance.Height * 0.5f, backgrodunEffect.transform.localPosition.z); loading.GetComponent <RectTransform>().sizeDelta = new Vector2(720, GameVO.Instance.PixelHeight * GameVO.Instance.scale); (Grammar.GetProperty(this, "bg" + UnityEngine.Random.Range(1, 6)) as GameObject).SetActive(true); gameObject.transform.localScale = new Vector3(GameVO.Instance.PixelWidth / 720f, GameVO.Instance.PixelWidth / 720f); if (GameVO.Instance.editor == false) { gameObject.SetActive(true); GameVO.Instance.dispatcher.AddListener(GameEvent.SHOW_MODULE, OnShowModule); GameVO.Instance.ShowModule(ModuleName.Main); loadingStep = 5; if (needLoading) { uicamera.localPosition = new Vector3(0, 0, -1000); loading.SetActive(true); GameVO.Instance.dispatcher.AddListener(GameEvent.SHOW_MODULE_COMPLETE, OnLoadingStep); GameVO.Instance.dispatcher.AddListener(GameEvent.READY_SHOW_MODULE, OnReadyShowStep); } else { uicamera.localPosition = new Vector3(0, 0, -50); GameVO.Instance.LoadingComplete(); loading.SetActive(false); } } else { gameObject.SetActive(false); } }