示例#1
0
    protected override void AfterWidgetAddedInList(GameObject v_object)
    {
        SceneChangerWidget v_widget = v_object.GetComponent <SceneChangerWidget>();

        if (v_widget != null)
        {
            v_widget.SetLabelText("" + (ObjectsInList.Count));
            v_widget.SetLevelToLoadOnClick(m_scenePrefixName + (ObjectsInList.Count));
            v_object.name = "" + (ObjectsInList.Count);
        }
    }
示例#2
0
 protected override void AfterAllWidgetsAddedInList()
 {
     //Unlock First Member
     if (UnlockFirstInList && ObjectsInList.Count > 0)
     {
         GameObject v_object = ObjectsInList[0];
         if (v_object != null)
         {
             SceneChangerWidget v_widget = v_object.GetComponent <SceneChangerWidget>();
             if (v_widget != null)
             {
                 v_widget.IsLocked = false;
             }
         }
     }
 }
示例#3
0
    protected virtual void UpdateGroupByLastSceneOrByLastUnlocked()
    {
        bool p_updated = false;

        if (TrackOldSceneToUpdateGroup)
        {
            for (int i = 0; i < ObjectsInList.Count; i++)
            {
                GameObject v_object = ObjectsInList[i];
                if (v_object != null)
                {
                    SceneChangerWidget v_widget = v_object.GetComponent <SceneChangerWidget>();
                    if (v_widget != null)
                    {
                        string v_levelToLoad = v_widget.GetLevelToLoadOnClick();
                        if (SceneManager.OldLevelName.Equals(v_levelToLoad))
                        {
                            SetMovableContainerPositionByGroupToShow(GetGroupByIndex(i), true);
                            p_updated = true;
                            break;
                        }
                    }
                }
            }
        }
        if (!p_updated)
        {
            for (int i = ObjectsInList.Count - 1; i >= 0; i--)
            {
                GameObject v_object = ObjectsInList[i];
                if (v_object != null)
                {
                    SceneChangerWidget v_widget = v_object.GetComponent <SceneChangerWidget>();
                    if (v_widget != null && !v_widget.IsLocked)
                    {
                        SetMovableContainerPositionByGroupToShow(GetGroupByIndex(i));
                        p_updated = true;
                        break;
                    }
                }
            }
        }
    }