AddToObjList() 공개 정적인 메소드

public static AddToObjList ( List list, FSO.SimAntics.VMEntity entity ) : void
list List
entity FSO.SimAntics.VMEntity
리턴 void
예제 #1
0
        public void RegeneratePortalInfo()
        {
            RoomInfo = new VMRoomInfo[Architecture.RoomData.Count()];
            for (int i = 0; i < RoomInfo.Length; i++)
            {
                RoomInfo[i].Entities = new List <VMEntity>();
                RoomInfo[i].Portals  = new List <VMRoomPortal>();
                RoomInfo[i].Room     = Architecture.RoomData[i];
                RoomInfo[i].Light    = new RoomLighting();
            }

            foreach (var obj in VM.Entities)
            {
                var room = GetObjectRoom(obj);
                VM.AddToObjList(RoomInfo[room].Entities, obj);
                if (obj.EntryPoints[15].ActionFunction != 0)
                { //portal object
                    AddRoomPortal(obj, room);
                }
                obj.SetRoom(room);
            }

            for (ushort i = 0; i < RoomInfo.Length; i++)
            {
                RefreshLighting(i, i == (RoomInfo.Length - 1));
            }
            if (VM.UseWorld)
            {
                World.InvalidateZoom();
            }
        }