1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using UnityEngine;
 
public class TimeRushTaskItem : MonoBehaviour
{
    [SerializeField] ItemCell itemCell;
    [SerializeField] ImageEx gray;
    [SerializeField] RotationTween tween;
 
    TimeRushManager manager { get { return TimeRushManager.Instance; } }
    public void Display(int state, int roundType, int itemId, int count)
    {
 
        gray.SetActive(state == 2);
 
        ItemCellModel cellModel = new ItemCellModel(itemId, false, count);
        itemCell.Init(cellModel);
        itemCell.button.AddListener(() =>
        {
            if (state == 1)
            {
                manager.HaveAllMissionAward(roundType);
            }
            else
            {
                ItemTipUtility.Show(itemId);
            }
        });
    }
 
    public void Play()
    {
        if (!gameObject.activeSelf)
            return;
        tween.Play();
    }
 
    public void Stop()
    {
        tween.Stop();
        tween.SetStartState();
    }
}