public void Init( ) { text.text = title; if (type != -1) { switch (type) { case 0: GetComponent <Button>().onClick.AddListener(delegate() { showManager.SetShowImage(SaveData.instance.ZhLists, 1); CatalogPanel.Instance.shrinkPanel(); }); break; case 1: GetComponent <Button>().onClick.AddListener(delegate() { showManager.SetShowImage(SaveData.instance.ZnLists, 1); CatalogPanel.Instance.shrinkPanel(); }); break; case 2: GetComponent <Button>().onClick.AddListener(delegate() { showManager.SetShowImage(project.spriteLists, 1); CatalogPanel.Instance.shrinkPanel(); }); break; } } }
// Start is called before the first frame update void Start() { jumpBtn.onClick.AddListener(delegate() { showManager.SetShowImage(curSpriteList, 1); Debug.Log(gameObject.name); }); }
//随机播放一个项目APP public void PlayRandomPPT(int time = 5) { this.gameObject.SetActive(true); limitTime = time; int projectIndex = UnityEngine.Random.Range(0, SaveData.instance.ProjectLists.Count - 1); //随机选择一个项目 currentPPT = SaveData.instance.ProjectLists[projectIndex]; showManager.SetShowImage(currentPPT.spriteLists, 1); currentPPTIndex = 0; playRandomPPT = true; }
void znBtnOnClick() { showManager.SetShowImage(SaveData.instance.ZnLists, 0); }