示例#1
0
    //從UFOList中新增UFO
    static public List <UFO> InstantiateUFOs(int lack)
    {
        //新加入UFO,保留原本UFO並加入新UFO
        List <UFO> TempUFOList = new List <UFO> ();

        //設定座標 & 實例化UFO
        for (int i = 0; i < lack; i++)
        {
            UFO ufo = new UFO(Level1_DB.LoadUFO [Level1_DB.g_iRandom]);

            ufo.GetUFO.transform.localPosition = GeneratePoint [s_iPos++ % 4];

            Level1_DB.UFOList.Add(ufo);

            TempUFOList.Add(ufo);

            ufo.AddListener();
        }
        return(TempUFOList);
    }