MapConfig = MapConfig or {} MapConfig.DefaultMaps = { "Map_Default" } MapConfig.MapType = { Random = 0, Level1 = 1, Level2 = 2, Level3 = 3, Level4 = 4, Level5 = 5, } MapConfig.ESpecialModeType = { Default = 1, --- 默认 LowGravity = 2, --- 低重力 HighMovementSpeed = 3, --- 高移速 Reduce = 4, --- 缩小 IndividualCompetition = 5, --- 个人竞技 } MapConfig.SpecialModeName = { [MapConfig.ESpecialModeType.Default] = "", [MapConfig.ESpecialModeType.LowGravity] = "低重力", [MapConfig.ESpecialModeType.HighMovementSpeed] = "加速场地", [MapConfig.ESpecialModeType.Reduce] = "缩小世界", [MapConfig.ESpecialModeType.IndividualCompetition] = "个人", } MapConfig.MapEnable = { [MapConfig.MapType.Random] = true, [MapConfig.MapType.Level1] = true, [MapConfig.MapType.Level2] = true, [MapConfig.MapType.Level3] = false, [MapConfig.MapType.Level4] = false, -- [MapConfig.MapType.Level5] = true, } MapConfig.MultiModeMapEnable = { [1001] = { [MapConfig.MapType.Random] = true, [MapConfig.MapType.Level1] = true, [MapConfig.MapType.Level2] = true, }, [1002] = { [MapConfig.MapType.Random] = true, [MapConfig.MapType.Level3] = true, [MapConfig.MapType.Level4] = true, } } MapConfig.MapInfo = { [MapConfig.MapType.Random] = { ShowName = "随机地图", MapName = "", SpecialModeType = MapConfig.ESpecialModeType.Default, }, [MapConfig.MapType.Level1] = { Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_XueShanBG.T_XueShanBG'), IconSelect = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_XueShanSelect.T_XueShanSelect'), ShowName = "雪山", MapName = "Map_Chengqu", MiniMapInfo = { MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MiniMap/T_ChengQu_MiniMap.T_ChengQu_MiniMap'), MapCentre = {X=500.000000,Y=-400.000000,Z=800.000000}, MapSize = 26000.0, MapScale = 30., }, bOpenness = true, SpecialModeType = MapConfig.ESpecialModeType.Default, }, [MapConfig.MapType.Level2] = { Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_HBBG.T_HBBG'), IconSelect = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_HBSelect.T_HBSelect'), ShowName = "河岸", MapName = "Map_Hebian", MiniMapInfo = { MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MiniMap/T_HB_MiniMap.T_HB_MiniMap'), MapCentre = {X=-4100.000000,Y=-5290.000000,Z=1660.000000}, MapSize = 36000.0, MapScale = 30., }, bOpenness = true, SpecialModeType = MapConfig.ESpecialModeType.Default, }, --[MapConfig.MapType.Level2] = { -- Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_Level2BG.T_Level2BG'), -- IconSelect = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_Level2Select.T_Level2Select'), -- ShowName = "圣诞农场", -- MapName = "Map_AQCS", -- MiniMapInfo = { -- MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MiniMap/T_MiniMap2.T_MiniMap2'), -- MapCentre = {X=0.000000,Y=700.000000,Z=100.000000}, -- MapSize = 20000.0, -- MapScale = 30., -- }, -- bOpenness = true, -- SpecialModeType = MapConfig.ESpecialModeType.Default, --}, --[MapConfig.MapType.Level3] = { -- Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_Level1BG.T_Level1BG'), -- IconSelect = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_Level1Select.T_Level1Select'), -- ShowName = "山林基地", -- MapName = "Map_foresrHouse", -- MiniMapInfo = { -- MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MiniMap/T_Level1MiniMap.T_Level1MiniMap'), -- MapCentre = {X=-200.000000,Y=0.000000,Z=800.000000}, -- MapSize = 16000.0, -- MapScale = 30., -- }, -- bOpenness = true, -- -- SpecialModeType = MapConfig.ESpecialModeType.HighMovementSpeed, -- SpecialModeParam = 1.7 --}, --[MapConfig.MapType.Level4] = { -- Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_Level2BG.T_Level2BG'), -- IconSelect = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_Level2Select.T_Level2Select'), -- ShowName = "圣诞农场", -- MapName = "Map_AQCS", -- MiniMapInfo = { -- MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MiniMap/T_MiniMap2.T_MiniMap2'), -- MapCentre = {X=0.000000,Y=700.000000,Z=100.000000}, -- MapSize = 20000.0, -- MapScale = 30., -- }, -- bOpenness = true, -- -- SpecialModeType = MapConfig.ESpecialModeType.LowGravity, -- SpecialModeParam = 0.3 --}, --[MapConfig.MapType.Level5] = { -- Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_Level2BG.T_Level2BG'), -- IconSelect = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_Level2Select.T_Level2Select'), -- ShowName = "测试关卡", -- MapName = "Map_Level2", -- MiniMapInfo = { -- MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MiniMap/T_MiniMap2.T_MiniMap2'), -- MapCentre = {X=0.000000,Y=700.000000,Z=100.000000}, -- MapSize = 20000.0, -- MapScale = 30., -- }, -- bOpenness = true, -- -- SpecialModeType = MapConfig.ESpecialModeType.HighMovementSpeed, -- SpecialModeParam = 1.7 --}, } MapConfig.MultiModeMapInfo = { [1001] = { [MapConfig.MapType.Random] = { ShowName = "随机地图", MapName = "", SpecialModeType = MapConfig.ESpecialModeType.Default, }, [MapConfig.MapType.Level1] = { Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_Level1BG.T_Level1BG'), IconSelect = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_Level1Select.T_Level1Select'), ShowName = "山林基地", MapName = "Map_foresrHouse", MiniMapInfo = { MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MiniMap/T_Level1MiniMap.T_Level1MiniMap'), MapCentre = {X=-200.000000,Y=0.000000,Z=800.000000}, MapSize = 16000.0, MapScale = 30., }, bOpenness = true, SpecialModeType = MapConfig.ESpecialModeType.Default, }, [MapConfig.MapType.Level2] = { Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_Level2BG.T_Level2BG'), IconSelect = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_Level2Select.T_Level2Select'), ShowName = "圣诞农场", MapName = "Map_AQCS", MiniMapInfo = { MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MiniMap/T_MiniMap2.T_MiniMap2'), MapCentre = {X=0.000000,Y=700.000000,Z=100.000000}, MapSize = 20000.0, MapScale = 30., }, bOpenness = true, SpecialModeType = MapConfig.ESpecialModeType.Default, }, }, [1002] = { [MapConfig.MapType.Random] = { ShowName = "随机地图", MapName = "", SpecialModeType = MapConfig.ESpecialModeType.Default, }, [MapConfig.MapType.Level3] = { Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_Level1BG.T_Level1BG'), IconSelect = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_Level1Select.T_Level1Select'), ShowName = "山林基地", MapName = "Map_foresrHouse", MiniMapInfo = { MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MiniMap/T_Level1MiniMap.T_Level1MiniMap'), MapCentre = { X = -200.000000, Y = 0.000000, Z = 800.000000 }, MapSize = 16000.0, MapScale = 30., }, bOpenness = true, SpecialModeType = MapConfig.ESpecialModeType.HighMovementSpeed, SpecialModeParam = 1.7 }, [MapConfig.MapType.Level4] = { Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_Level2BG.T_Level2BG'), IconSelect = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_Level2Select.T_Level2Select'), ShowName = "圣诞农场", MapName = "Map_AQCS", MiniMapInfo = { MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MiniMap/T_MiniMap2.T_MiniMap2'), MapCentre = { X = 0.000000, Y = 700.000000, Z = 100.000000 }, MapSize = 20000.0, MapScale = 30., }, bOpenness = true, SpecialModeType = MapConfig.ESpecialModeType.LowGravity, SpecialModeParam = 0.3 }, } } MapConfig.SpecialModeFunc = { [MapConfig.ESpecialModeType.LowGravity] = function(GravityScale) if GravityScale == nil then GravityScale = 0.3 end UGCEventSystem.AddListener(EventEnum.PlayerBeginPlay, function(PlayerPawn) PlayerPawn:SetGravityScale(GravityScale) end ) end, [MapConfig.ESpecialModeType.HighMovementSpeed] = function(SpeedScale) UGCEventSystem.AddListener(EventEnum.PlayerBeginPlay, function(PlayerPawn) UGCPawnAttrSystem.SetSpeedScale(PlayerPawn, SpeedScale) end ) end, [MapConfig.ESpecialModeType.Reduce] = function(ScaleValue) if ScaleValue == nil then ScaleValue = 0.5 end UGCEventSystem.AddListener(EventEnum.PlayerBeginPlay, function(PlayerPawn) UGCEventSystem.SetTimer(UGCGameSystem.GameState, function() if UE.IsValid(PlayerPawn) then PlayerPawn:ScalePlayer(ScaleValue) end end, 1.) end ) end, } function MapConfig.GetMultiModeMapInfo() local ModeID = UGCMultiMode.GetModeID() UGCLogSystem.Log("[MapConfig_GetMultiModeMapInfo] ModeID:%s", tostring(ModeID)) return MapConfig.MultiModeMapInfo[ModeID] and MapConfig.MultiModeMapInfo[ModeID] or MapConfig.MapInfo end function MapConfig.GetMultiModeMapEnable() local ModeID = UGCMultiMode.GetModeID() UGCLogSystem.Log("[MapConfig_GetMultiModeMapEnable] ModeID:%s", tostring(ModeID)) return MapConfig.MultiModeMapEnable[ModeID] and MapConfig.MultiModeMapEnable[ModeID] or MapConfig.MapEnable end