// View Initialization
    void Start()
    {
        MAS_RewardsList master = (MAS_RewardsList)COM_Director.GetMaster("MAS_RewardsList");

        if (master != null)
        {
            controller = (CON_RewardsList)master.GetController("CON_RewardsList");

            if (controller != null)
            {
                if (controller.IsEditMode)
                {
                    SetupSceneEdit();
                }
                else
                {
                    SetupSceneAdd();
                }

                LoadRewardImagePreview();
            }
        }

        StartCoroutine(StartWaitHelper());
    }
Example #2
0
    // View Initialization
    void Start()
    {
        Debug.Log(CLASSNAME + "Starting up view");
        MAS_RewardsList     master         = (MAS_RewardsList)COM_Director.GetMaster("MAS_RewardsList");
        VerticalLayoutGroup verticalLayout = viewportContent.transform.GetComponent <VerticalLayoutGroup>();

        // entrySize = g.cellSize.y + g.spacing.y;

        if (master != null)
        {
            controller = (CON_RewardsList)master.GetController("CON_RewardsList");
            if (controller != null)
            {
                Debug.Log(CLASSNAME + "***************** CONTROLLER NOT NULL");
                Dictionary <string, DO_Reward> data = controller.GetRewardsListData();

                foreach (var entry in data)
                {
                    AddRewardItem(entry.Value.id, entry.Value.reward_name);
                }
                AlterContentBoxSizing(currentEntries);
            }
        }
    }