Example #1
0
 public override void OnStart(Transform transform)
 {
     baseHelper = new SingleRectCircleHelper <int>(transform, () => {
         return(new TaskItem());
     });
     for (int i = 0; i < 100; i++)
     {
         baseHelper.AddItem(i);
     }
     baseHelper.OnStart();
     //How to load data?
 }
Example #2
0
 public override void OnStart(Transform transform)
 {
     baseHelper = new SingleRectCircleHelper <string>(transform, () => {
         return(new ChatItem());
     });
     //How to load data?
     for (int i = 0; i < ChatItem.Length; ++i)
     {
         baseHelper.AddItem(ChatItem[i]);
     }
     baseHelper.OnStart();
 }
 public override void OnStart(Transform transform)
 {
     baseHelper = new SingleRectCircleHelper <string>(transform, () => {
         return(new ShapItem());
     });
     DiaItems = Resources.Load <SpriteAtlas>("DiaItems");
     for (int i = 1; i <= DiaItems.spriteCount; ++i)
     {
         baseHelper.AddItem("dia (" + i + ")");
     }
     baseHelper.OnStart();
     //How to load data?
 }
Example #4
0
 public override void OnStart(Transform transform)
 {
     baseHelper = new SingleRectCircleHelper <PageInfo>(transform, () => {
         return(new PageItem());
     });
     //How to load data?
     for (int i = 0; i < PageItems.Length; ++i)
     {
         PageInfo pageInfo;
         pageInfo.Content = PageItems[i];
         pageInfo.PageNum = i;
         baseHelper.AddItem(pageInfo);
     }
     baseHelper.OnStart();
 }
Example #5
0
 public override void OnStart(Transform transform)
 {
     baseHelper = new SingleRectCircleHelper <SkillInfo>(transform, () => {
         return(new SkillItem());
     });
     SkillItems = Resources.Load <SpriteAtlas>("SkillIcons");
     System.Random rnd = new System.Random();
     for (int i = 1; i <= SkillItems.spriteCount; ++i)
     {
         //模拟人物数据
         SkillInfo skillInfo;
         skillInfo.SkillPath = "skill_icon (" + i + ")";
         skillInfo.SkillName = "技能" + i;
         skillInfo.SkillHurt = rnd.Next(1, 100);
         baseHelper.AddItem(skillInfo);
     }
     baseHelper.OnStart();
 }