コード例 #1
0
        private void RouteActionTo(GameAction action)
        {
            switch (action.AdditionalData)
            {
            case "entity":
                _entities.GetById(action.ReceiverId)?.HandleAction(action);
                break;

            case "room":
                _locations.GetRoomById(action.ReceiverId)?.HandleAction(action);
                break;

            case "region":
                _locations.GetRegionById(action.ReceiverId)?.HandleAction(action);
                break;

            case "portal":
                _locations.GetPortalById(action.ReceiverId)?.HandleAction(action);
                break;
            }
        }