Esempio n. 1
0
 public void ReleasePick()
 {
     if (select != null)
     {
         DisableEventList();
         select.ReleasePick();
         Test.instance.currFrame = -1;
         select = null;
     }
 }
Esempio n. 2
0
    public void Pick(int code)
    {
        if (code == -1)
        {
            return;
        }
        if (select != frames[code])
        {
            ReleasePick();
        }

        Test.instance.currFrame = code;
        select = frames[code];
        select.Pick();
        EventListUpdate();
    }
Esempio n. 3
0
 public int Pick(FrameScript frame)
 {
     if (select != frame)
     {
         ReleasePick();
         select = frame;
         select.Pick();
         EventListUpdate();
         return(int.Parse(select.name));
     }
     else
     {
         DisableEventList();
         ReleasePick();
     }
     return(-1);
 }
Esempio n. 4
0
    public void Init(Test.Container con)
    {
        select = null;
        if (frames != null)
        {
            Release();
        }
        frames = new FrameScript[60];
        for (int i = 0; i < 60; ++i)
        {
            FrameScript obj = Instantiate(frameObj, Vector2.zero, Quaternion.identity).GetComponent <FrameScript>();
            obj.name = i.ToString();
            obj.transform.SetParent(transform);
            obj.transform.localScale = new Vector3(1f, 1f, 1f);
            float value = -590.5f + (i * 20f);
            obj.transform.localPosition = new Vector2(value, 0f);

            obj.Init(con.frames[0][i]);
            frames[i] = obj;
        }
    }