Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     _Instance = this;
     //_Instance = this;
     //ZhuiYaUIList = new List<XKPlayerZhuiYaUI>();
     //GameObject obj = null;
     //for (int i = 0; i < MaxPlayerFS; i++) {
     //	obj = (GameObject)Instantiate(gmDataPrefab);
     //	obj.transform.parent = transform;
     //	obj.transform.localScale = new Vector3(1f, 1f, 1f);
     //	obj.transform.localPosition = Vector3.zero;
     //	ZhuiYaUIList.Add(obj.GetComponent<XKPlayerZhuiYaUI>());
     //	obj.SetActive(false);
     //}
 }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        _Instance    = this;
        ZhuiYaUIList = new List <XKPlayerZhuiYaUI>();
        GameObject obj = null;

        for (int i = 0; i < MaxPlayerFS; i++)
        {
            obj = (GameObject)Instantiate(PlayerZhuiYaUI);
            obj.transform.parent        = transform;
            obj.transform.localScale    = new Vector3(1f, 1f, 1f);
            obj.transform.localPosition = Vector3.zero;
            ZhuiYaUIList.Add(obj.GetComponent <XKPlayerZhuiYaUI>());
            obj.SetActive(false);
        }
    }