private void Awake()
 {
     Minigame        = MinigameManager.GetActive <mg_PuffleRoundup>();
     m_roundCount    = GetComponentInChildren <mg_pr_UIRoundCount>();
     m_timerCount    = GetComponentInChildren <mg_pr_UITimerCount>();
     m_pieTimer      = GetComponentInChildren <mg_pr_UIPieTimer>();
     m_pufflePen     = Minigame.transform.Find("mg_pr_GameContainer/mg_pr_pf_GameBG(Clone)/mg_pr_pf_Pen").gameObject;
     m_pufflePenAnim = m_pufflePen.GetComponent <Animator>();
     m_pufflePenAnim.SetInteger("dir", 1);
 }
Exemple #2
0
        private void Awake()
        {
            m_PuffleContainer   = MinigameSpriteHelper.CreateContainer("mg_pr_PuffleContainer");
            m_ObsticleContainer = MinigameSpriteHelper.CreateContainer("mg_pr_ObsticleContainer");
            Minigame            = MinigameManager.GetActive <mg_PuffleRoundup>();
            penBoundsGO         = Minigame.transform.Find("mg_pr_GameContainer/mg_pr_pf_GameBG(Clone)/mg_pr_pf_Pen").gameObject;
            GameObject baseContainer = GetComponent <mg_pr_GameLogic>().BaseContainer;

            MinigameSpriteHelper.AssignParent(m_PuffleContainer, baseContainer);
            MinigameSpriteHelper.AssignParent(m_ObsticleContainer, baseContainer);
        }
        protected void Awake()
        {
            BaseContainer = MinigameSpriteHelper.CreateContainer("mg_pr_GameContainer");
            mg_PuffleRoundup active = MinigameManager.GetActive <mg_PuffleRoundup>();

            m_background = active.Resources.GetInstancedResource(mg_pr_EResourceList.GAME_ASSET_BACKGROUND);
            MinigameSpriteHelper.SetSpriteLayer(m_background, -100);
            Vector3 localScale = m_background.transform.localScale;

            MinigameSpriteHelper.FitSpriteToScreen(active.MainCamera, m_background, _preserveAspect: false);
            MinigameSpriteHelper.AssignParent(m_background, BaseContainer);
            BaseContainer.transform.localScale = m_background.transform.localScale;
            m_background.transform.localScale  = localScale;
            BaseContainer.transform.parent     = active.transform;
            m_caughtGo  = GetComponentInChildren <mg_pr_UICaughtCount>();
            m_escapedGo = GetComponentInChildren <mg_pr_UIEscapedCount>();
        }
 private void Awake()
 {
     Minigame = MinigameManager.GetActive <mg_PuffleRoundup>();
     m_anim   = GetComponent <Animator>();
 }
 private void Awake()
 {
     Minigame = MinigameManager.GetActive <mg_PuffleRoundup>();
 }