Exemplo n.º 1
0
    public void RemoveStillElement(StillElement ele, Vector3 savedPos)
    {
        var index = AllRandomObjList.IndexOf(ele);

        AllRandomObjList.RemoveAt(index);

        //SpawnedData sData = new SpawnedData(ele.transform.position, ele.transform.rotation, ele.HType,
        //    ele.RootToSpawnIndex, ele.IndexAllVertex);

        var sData = AllSpawnedDataList.Where(a => a.Pos == savedPos).FirstOrDefault();

        //a not valid Spawner calling this
        if (sData == null)
        {
            return;
        }
        index = AllSpawnedDataList.IndexOf(sData);
        AllSpawnedDataList.RemoveAt(index);
    }