MapConfig = MapConfig or {} MapConfig.DefaultMaps = { --"Map_Default" "Map_Default2" } 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.MapInfo = { --{ -- ShowName = "巷战", -- MapName = "Map_xiangzhan", -- MiniMapInfo = { -- MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Levels/MiniMap/T_XZMinimap.T_XZMinimap'), -- MapCentre = {X=50.000000,Y=450.000000,Z=300.000000}, -- MapSize = 10000.0, -- MapScale = 30., -- }, -- SpecialModeType = MapConfig.ESpecialModeType.Default, -- ProbabilityOfPlaying = 10, --}, { ShowName = "悬浮空岛", MapName = "Map_NHJJ", MiniMapInfo = { MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Levels/MiniMap/MiniMap_NHJJ.MiniMap_NHJJ'), MapCentre = {X=0.000000,Y=0.000000,Z=300.000000}, MapSize = 16000.0, MapScale = 30., }, SpecialModeType = MapConfig.ESpecialModeType.Default, ProbabilityOfPlaying = 1000, }, } 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, }