protected override void SetResources() { m_imgPopupBoard.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_imgPopupBackground.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_imgPopupIcon.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_LEFT); m_imgPopupTitle.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_LEFT); m_btnPopupExit.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_LEFT); if (m_bBaseSizeX == -1) { m_bBaseSizeX = m_imgPopupBoard.GetTextureSizeX(); m_bBaseSizeY = m_imgPopupBoard.GetTextureSizeY(); } m_btnPopupExit.SetValueChangedDelegate(ExitProcess); if (m_bAnimation) { SetBoardAnimation(0.0f); } else { m_imgPopupBackground.SetTextureSize(m_bBaseSizeX - 20.0f, m_bBaseSizeY - 90.0f); } }
protected override void SetResources() { m_imgProgressCircleFilter.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_imgProgressCircleImage.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_imgProgressCircle.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_imgProgressCircleFilter.SetTextureSize(DefineBaseManager.inst.GameBaseWidth, DefineBaseManager.inst.GameBaseHeight); }
protected override void SetResources() { m_imgMainBoard.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_imgBackground.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_imgRankingBoard.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_btnGameStart.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_CENTER); m_imgBackground.SetTextureSize(m_imgRankingBoard.GetTextureSizeX() - 20.0f, m_imgRankingBoard.GetTextureSizeY() - 30.0f); m_btnGameStart.SetValueChangedDelegate(StartButtonProcess); for (int i = 0; i < (int)POPUP_STATE._MAX; i++) { m_btnTab[i].SetData(i); m_btnTab[i].SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_btnTab[i].SetValueChangedDelegate(TabButtonProcess); } }
protected override void SetResources() { m_imgAdviceBoard.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_imgAdviceFilter.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); for (int i = 0; i < m_dMaxPage; i++) { m_imgAdviceHelp[i].SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); } m_imgAdviceFilter.SetTextureSize(DefineBaseManager.inst.GameBaseWidth, DefineBaseManager.inst.GameBaseHeight); m_btnAdviceBefore.SetAnchor(SpriteRoot.ANCHOR_METHOD.BOTTOM_LEFT); m_btnAdviceNext.SetAnchor(SpriteRoot.ANCHOR_METHOD.BOTTOM_RIGHT); m_btnAdviceExit.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_RIGHT); m_btnAdviceBefore.SetValueChangedDelegate(BeforeProcess); m_btnAdviceNext.SetValueChangedDelegate(NextProcess); m_btnAdviceExit.SetValueChangedDelegate(ExitProcess); }
public void SetKittyLeg(Object _BaseObj) { if (m_imgKittyLeg != null) { return; } GameObject tmpObj = ResourceLoad.GetEzGuiTexture(_BaseObj); if (tmpObj.GetComponent <EzGui_Texture>()) { m_imgKittyLeg = tmpObj.GetComponent <EzGui_Texture>(); m_imgKittyLeg.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); } tmpObj.name = "KittyLeg"; tmpObj.layer = m_LayerMask; tmpObj.transform.parent = m_imgKittyHead.gameObject.transform; tmpObj.transform.localPosition = m_LegPos; SetTmpEffectZero(); tmpObj.transform.localScale = m_vecTmp; }
protected override void SetResources() { GameObject tmpObject = new GameObject("Score"); m_scriptScore = tmpObject.AddComponent <HudNumberManager>(); m_scriptScore.Create(); m_scriptScore.color = Color.white; m_scriptScore.BasePosType = (int)HUD_BASE_POS._MIDDLE_CENTER; m_scriptScore.ChildAnchor = SpriteRoot.ANCHOR_METHOD.UPPER_CENTER; m_scriptScore.IsCommaOn = true; SetScore(0); m_imgScoreBoard.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_imgBackground.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_btnGoReady.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_CENTER); m_btnGoMain.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_CENTER); m_imgBackground.SetTextureSize(DefineBaseManager.inst.GameBaseWidth, DefineBaseManager.inst.GameBaseHeight); m_btnGoReady.SetValueChangedDelegate(RegameProcess); m_btnGoMain.SetValueChangedDelegate(GoMainProcess); }
protected override void SetResources() { m_imgBackBoard.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_imgReadyBoard.SetAnchor(SpriteRoot.ANCHOR_METHOD.BOTTOM_CENTER); m_imgCharBoard.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_CENTER); m_imgItemBoard.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_CENTER); m_btnBlockPos.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_CENTER); m_btnBlockSet.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_CENTER); m_btnStart.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_CENTER); m_btnExit.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_btnStart.SetValueChangedDelegate(StartButtonProcess); m_btnExit.SetValueChangedDelegate(ExitButtonProcess); int count = Main.data.GetCount_Item(); for (int i = 0; i < count; i++) { m_btnItem[i].SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_btnItem[i].SetValueChangedDelegate(ItemButtonProcess); } }
protected override void SetResources() { GameObject tmpObject = new GameObject("Score"); m_scriptScore = tmpObject.AddComponent <HudNumberManager>(); m_scriptScore.Create(); m_scriptScore.color = Color.white; m_scriptScore.BasePosType = (int)HUD_BASE_POS._TOP_CENTER; m_scriptScore.ChildAnchor = SpriteRoot.ANCHOR_METHOD.UPPER_CENTER; m_scriptScore.IsCommaOn = true; m_scriptScore.SetNumber(0); tmpObject.transform.parent = Main.inst.GetResourceObject_EZGUITEXTURE().transform; m_imgGameBoard.SetTextureSize(DefineBaseManager.inst.GameBaseWidth, DefineBaseManager.inst.GameBaseHeight); m_btnAdvice.SetValueChangedDelegate(AdviceProcess); m_btnPause.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_RIGHT); m_btnPause.SetValueChangedDelegate(SetPauseProcess); m_btnPlay.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_RIGHT); m_btnPlay.SetValueChangedDelegate(SetPauseProcess); m_imgSelectBtn.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); int count = Main.game.GetGameItemManager().GetServiceableActiveItemNum(); for (int i = 0; i < count; i++) { m_btnItem[i].GetUIButton().Data = Main.game.GetGameItemManager().GetServiceableActiveItemIndex(i); m_btnItem[i].SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_btnItem[i].SetValueChangedDelegate(ItemProcess); m_txtItem[i].SetAnchor(SpriteText.Anchor_Pos.Lower_Right); m_txtItem[i].SetAllignment(SpriteText.Alignment_Type.Right); } }
private void SetResources() { m_imgBoard.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_LEFT); m_imgIcon.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); m_btnAdd.SetAnchor(SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER); }