Exemplo n.º 1
0
    public static SQYCharatorView CreateCharatorView()
    {
        UObject obj = PrefabLoader.loadFromPack("SQY/pbSQYCharatorView");

        if (obj != null)
        {
            GameObject      go = Instantiate(obj) as GameObject;
            SQYCharatorView cv = go.GetComponent <SQYCharatorView>();
            obj = null;
            return(cv);
        }
        return(null);
    }
Exemplo n.º 2
0
 void Awake()
 {
     for (int i = 0; i < lstAvatars.Count; i++)
     {
         SQYCharatorView cv = SQYCharatorView.CreateCharatorView();
         cv.mIndex = i;
         RED.AddChild(cv.gameObject, lstAvatars[i]);
         cv.OnDrag  += this.OnDrag;
         cv.OnPress += this.OnPress;
         cv.OnClick += this.OnClick;
         szHeadViews.Add(cv);
     }
     UIEventListener.Get(goZhuanPan).onDrag = this.OnDrag;
 }