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); } }
private void Awake() { UIFix.SetDistanceToTop(hexTrans); quitSelection.GetComponent <RectTransform>().sizeDelta = new Vector2(720, GameVO.Instance.PixelHeight); sure.localScale = new Vector3(0, 1); cancel.localScale = new Vector3(0, 1); quitSelection.SetActive(false); flush.SetActive(false); ButtonClick.dispatcher.AddListener("quitGame", OnQuit); ButtonClick.dispatcher.AddListener("restart", OnRestart); ButtonClick.dispatcher.AddListener("nextGame", OnNextGame); ButtonClick.dispatcher.AddListener("gameSure", OnQuitSure); ButtonClick.dispatcher.AddListener("gameCancel", OnQuitCancel); ButtonClick.dispatcher.AddListener("quitGameQuit_Down", OnQuitCancel); ButtonClick.dispatcher.AddListener("tip", OnTip); MainData.Instance.dispatcher.AddListener(hexjig.EventType.FINISH_LEVEL, OnFinshLevel); MainData.Instance.dispatcher.AddListener(hexjig.EventType.SHOW_CUT_COMPLETE, OnShowCutComplete); MainData.Instance.time.AddListener(lib.Event.CHANGE, OnTimeChange); MainData.Instance.dispatcher.AddListener(hexjig.EventType.SET_PIECE, OnSetPiece); MainData.Instance.dispatcher.AddListener(hexjig.EventType.SHOW_GAME_CHANGE_OUT_EFFECT_COMPLETE, OnFinshLevel2); }
private void Awake() { UIFix.SetDistanceToTop(quit); }