ItemTest.cs 530 B

1234567891011121314151617181920212223
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. public class ItemTest :ReusingScrollItemBase
  5. {
  6. public override void OnInit()
  7. {
  8. base.OnInit();
  9. AddOnClickListener("Image_item", OnClick);
  10. }
  11. public override void SetContent(int index, Dictionary<string, object> data)
  12. {
  13. GetText("Text").text = index.ToString() + RandomService.Range(0,100);
  14. }
  15. public void OnClick(InputUIOnClickEvent e)
  16. {
  17. Debug.Log("item onclick " + m_index);
  18. }
  19. }