Beispiel #1
0
        public void AttachGoalBar(mg_jr_UIGoalBar p_goalBar)
        {
            m_goalBar           = p_goalBar;
            m_goalBarOrigParent = p_goalBar.transform.parent;
            m_goalBarOrigPos    = ((RectTransform)m_goalBar.transform).anchoredPosition;
            Transform transform = base.transform.Find("mg_jr_GoalBarSocket");

            m_goalBar.transform.position = transform.position;
            m_goalBar.transform.SetParent(transform);
            m_goalBar.UpdateGoalDisplay();
        }
Beispiel #2
0
        public void BoostGoal()
        {
            mg_jr_Goal goalToDisplay = m_goalBar.GoalToDisplay;
            float      num           = (float)(goalToDisplay.CurrentLevelTarget - 1) - goalToDisplay.Progress;

            if (num <= 0f)
            {
                DisneyMobile.CoreUnitySystems.Logger.LogWarning(this, "Don't reduce progress");
                return;
            }
            bool condition = goalToDisplay.AddToProgressAndCheckCompletion(num);

            m_goalBar.UpdateGoalDisplay();
            Assert.IsFalse(condition, "this shouldn't complete a goal");
        }