예제 #1
0
    //create or updates specific lists
    void CreateOrUpdateSpecificsList(H typePass, TerrainRamdonSpawner temp, H action)
    {
        //print(typePass + " " + action);

        if (typePass == H.Tree)
        {
            if (action == H.Create)
            {
                treeList.Add((TreeVeget)temp);
            }
            else if (action == H.Update)
            {
                treeList = UList.UpdateAList(treeList, temp);
            }
        }
        else if (typePass == H.Stone)
        {
            if (action == H.Create)
            {
                stoneList.Add(temp as StoneRock);
            }
            else if (action == H.Update)
            {
                stoneList = UList.UpdateAList(stoneList, temp);
            }
        }
        else if (typePass == H.Iron)
        {
            if (action == H.Create)
            {
                ironList.Add(temp as IronRock);
            }
            else if (action == H.Update)
            {
                ironList = UList.UpdateAList(ironList, temp);
            }
        }
        else if (typePass == H.Ornament)
        {
            if (action == H.Create)
            {
                ornaList.Add((StillElement)temp);
            }
            else if (action == H.Update)
            {
                ornaList = UList.UpdateAList(ornaList, temp);
            }
        }
        else if (typePass == H.Grass)
        {
            if (action == H.Create)
            {
                grassList.Add((StillElement)temp);
            }
            else if (action == H.Update)
            {
                grassList = UList.UpdateAList(grassList, temp);
            }
        }
        else if (typePass == H.Marine)
        {
            if (action == H.Create)
            {
                marineList.Add((StillElement)temp);
            }
            else if (action == H.Update)
            {
                marineList = UList.UpdateAList(marineList, temp);
            }
        }
        else if (typePass == H.Mountain)
        {
            if (action == H.Create)
            {
                mountainList.Add((StillElement)temp);
            }
            else if (action == H.Update)
            {
                mountainList = UList.UpdateAList(mountainList, temp);
            }
        }
    }