Example #1
0
    static void CreateTransporter()
    {
        if (!CheckSelection("zone"))
        {
            Debug.LogError("必须先选择zone");
            return;
        }
        GameObject go = LevelTransporter.Create();

        go.transform.parent = Selection.activeTransform;
    }
Example #2
0
    /// <summary>
    /// 查找Transporter
    /// </summary>
    public List <LevelTransporter> FindTransporters(int zoneid)
    {
        List <LevelTransporter> list = new List <LevelTransporter>();

        if (this.mTransporterList.ContainsKey(zoneid))
        {
            List <IDObject> spawns;
            mTransporterList.TryGetValue(zoneid, out spawns);


            foreach (IDObject lt in spawns)
            {
                LevelTransporter trasporter = (LevelTransporter)lt;
                if (trasporter.zone_id == zoneid)
                {
                    list.Add(trasporter);
                }
            }
        }

        return(list);
    }