GetObjectGroup() public method

public GetObjectGroup ( ) : ObjectGroup
return ObjectGroup
Exemplo n.º 1
0
        // Methods

        public void SetRoom(Room r, int season, bool changedFromWarpFollow = false)
        {
            if (r == Room && this.season == season)
            {
                return;
            }

            if (room != null)
            {
                RoomLayout.LayoutModifiedEvent -= OnLayoutModified;
                room.GetObjectGroup().RemoveModifiedHandler(OnObjectModified);
                room.GetWarpGroup().RemoveModifiedHandler(OnWarpModified);
            }

            room = r;
            if (season != -1)
            {
                this.season = season;
            }

            if (room != null)
            {
                RoomLayout.LayoutModifiedEvent += OnLayoutModified;
                room.GetObjectGroup().AddModifiedHandler(OnObjectModified);
                room.GetWarpGroup().AddModifiedHandler(OnWarpModified);

                Width  = room.Width;
                Height = room.Height;

                ObjectGroupEditor.SetObjectGroup(room.GetObjectGroup());
            }

            if (r == null)
            {
                EditingWarpDestination = null;
            }

            GenerateRoomComponents();
            selectedComponent = null;

            if (EditingWarpDestination != null)
            {
                EditingWarpDestination.DestRoom = r;
            }

            roomEventWrapper.ReplaceEventSource(room);
            UpdateChestEvents();

            RoomChangedEvent?.Invoke(this,
                                     new RoomChangedEventArgs {
                room = r, fromFollowWarp = changedFromWarpFollow
            });

            QueueDraw();
        }
Exemplo n.º 2
0
    void SetRoom(Room room)
    {
        if (Project == null)
            return;
        roomeditor1.SetRoom(room);
        SetArea(room.Area);
        musicComboBox.Active = Project.MusicMapping.IndexOf((byte)room.GetMusicID());
        roomSpinButton.Value = room.Index;

        objectgroupeditor1.SetObjectGroup(room.GetObjectGroup());
    }