コード例 #1
0
        public void Handle(Player player, Request request)
        {
            if (player.RoomUser.Room == null)
            {
                return;
            }

            Room room = player.RoomUser.Room;

            if (room == null || !room.IsOwner(player.Details.Id))
            {
                return;
            }

            Item moodlight = room.ItemManager.Items.Values.SingleOrDefault(x => x.Definition.InteractorType == InteractorType.ROOMDIMMER);

            if (moodlight == null)
            {
                return;
            }

            MoodlightExtraData moodlightData = (MoodlightExtraData)moodlight.Interactor.GetJsonObject();

            player.Send(new MoodlightConfigComposer(moodlightData));
        }
コード例 #2
0
 public MoodlightConfigComposer(MoodlightExtraData moodlightData)
 {
     this.moodlightData = moodlightData;
 }