diff --git a/Assets/Scripts/Games/NightWalkAgb/AgbNightWalk.cs b/Assets/Scripts/Games/NightWalkAgb/AgbNightWalk.cs index 1ac27a191..72a32c1df 100644 --- a/Assets/Scripts/Games/NightWalkAgb/AgbNightWalk.cs +++ b/Assets/Scripts/Games/NightWalkAgb/AgbNightWalk.cs @@ -28,7 +28,9 @@ namespace HeavenStudio.Games.Loaders { parameters = new List() { - new Param("value", new EntityTypes.Integer(-10, 10, 1), "Height Units") + new Param("value", new EntityTypes.Integer(-10, 10, 1), "Height Units"), + new Param("rmin", new EntityTypes.Integer(-10, 10, 0), "Random Units (Minimum)"), + new Param("rmax", new EntityTypes.Integer(-10, 10, 0), "Random Units (Maximum)"), } } }); @@ -48,7 +50,7 @@ namespace HeavenStudio.Games [NonSerialized] public double countInBeat = -1; [Header("Curves")] [SerializeField] SuperCurveObject.Path[] jumpPaths; - [NonSerialized] public Dictionary platformHeightChanges = new Dictionary(); + [NonSerialized] public Dictionary platformHeightChanges = new Dictionary(); new void OnDrawGizmos() { @@ -80,13 +82,14 @@ namespace HeavenStudio.Games List heightEvents = EventCaller.GetAllInGameManagerList("nightWalkAgb", new string[] { "height" }); foreach (var height in heightEvents) { + int randomValue = UnityEngine.Random.Range(height["rmin"], height["rmax"]); if (platformHeightChanges.ContainsKey(height.beat)) { - platformHeightChanges[height.beat]["value"] += height["value"]; + platformHeightChanges[height.beat] += height["value"] + randomValue; } else { - platformHeightChanges.Add(height.beat, height); + platformHeightChanges.Add(height.beat, height["value"] + randomValue); } } } diff --git a/Assets/Scripts/Games/NightWalkAgb/AgbPlatform.cs b/Assets/Scripts/Games/NightWalkAgb/AgbPlatform.cs index 21fcf2d52..03cbbbf38 100644 --- a/Assets/Scripts/Games/NightWalkAgb/AgbPlatform.cs +++ b/Assets/Scripts/Games/NightWalkAgb/AgbPlatform.cs @@ -34,13 +34,13 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk if (game == null) game = AgbNightWalk.instance; if (game.platformHeightChanges.ContainsKey(hitBeat)) { - handler.defaultHeightUnits += game.platformHeightChanges[hitBeat]["value"]; + handler.defaultHeightUnits += game.platformHeightChanges[hitBeat]; } lastAdditionalHeightInUnits = handler.defaultHeightUnits; additionalHeight = handler.defaultHeightUnits * handler.heightAmount; if (game.platformHeightChanges.ContainsKey(hitBeat + 1)) { - additionalHeightInUnits = lastAdditionalHeightInUnits + game.platformHeightChanges[hitBeat + 1]["value"]; + additionalHeightInUnits = lastAdditionalHeightInUnits + game.platformHeightChanges[hitBeat + 1]; } else {