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() { 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); } }