2025-01-04 23:00:19 +08:00

117 lines
4.0 KiB
Lua

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_SLXZ2",
MiniMapInfo = {
MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MiniMap/T_Level1MiniMap.T_Level1MiniMap'),
MapCentre = {X=-405.000000,Y=280.000000,Z=29.999756},
MapSize = 10000.0,
MapScale = 50.,
},
SpecialModeType = MapConfig.ESpecialModeType.Default,
ProbabilityOfPlaying = 5,
},
{
ShowName = "小巷",
MapName = "Map_xiangzhan",
MiniMapInfo = {
MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MiniMap/T_XZMinimap.T_XZMinimap'),
MapCentre = {X=50.000000,Y=450.000000,Z=300.000000},
MapSize = 10000.0,
MapScale = 50.,
},
SpecialModeType = MapConfig.ESpecialModeType.Default,
ProbabilityOfPlaying = 5,
},
{
ShowName = "遗迹基地",
MapName = "Map_YJTW",
MiniMapInfo = {
MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MiniMap/T_YJTWN.T_YJTWN'),
MapCentre = {X=6600.000000,Y=2700.000000,Z=-0.000458},
MapSize = 18000.0,
MapScale = 50.,
},
SpecialModeType = MapConfig.ESpecialModeType.Default,
ProbabilityOfPlaying = 5,
},
--{
-- Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_YJBG.T_YJBG'),
-- IconSelect = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MapImage/T_YJSelect.T_YJSelect'),
-- ShowName = "遗迹",
-- Recommend = 5,
-- MapName = "Map_YiJi",
-- MiniMapInfo = {
-- MapPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/MiniMap/T_YiJi_MiniMap.T_YiJi_MiniMap'),
-- MapCentre = {X=50.000000,Y=-100.000000,Z=300.000000},
-- MapSize = 12000.0,
-- MapScale = 20.,
-- },
-- bOpenness = true,
-- SpecialModeType = MapConfig.ESpecialModeType.SnipingAction,
-- SpecialModeParam = WeaponGradientTable.SnipeGradient,
-- ProbabilityOfPlaying = 5,
--},
}
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,
}