Example #1
0
        ExpandableSimpleClientModel CreateNewModel(int index)
        {
            var model = new ExpandableSimpleClientModel()
            {
                clientName      = sampleFirstNames[CUtil.Rand(sampleFirstNames.Length)],
                location        = sampleLocations[CUtil.Rand(sampleLocations.Length)],
                nonExpandedSize = _PrefabLayoutElement.preferredHeight
            };

            model.SetRandom();

            return(model);
        }
        ExpandableSimpleClientModel CreateNewModel(int index)
        {
            level_text.text = "Level " + level;
            exp_text.text   = "Next Level" + demoUI.exp + " / " + requireExp;
            var model = new ExpandableSimpleClientModel()
            {
                clientName      = sampleFirstNames[CUtil.Rand(sampleFirstNames.Length)],
                location        = sampleLocations[CUtil.Rand(sampleLocations.Length)],
                avatarPic       = sampleAvatar[Data.Count],
                nonExpandedSize = _PrefabLayoutElement.preferredHeight
            };

            model.SetRandom();
            demoUI.exp += 1;
            Debug.Log(demoUI.exp);
            ChangeLevel();

            return(model);
        }