improved interaction between roll cue and platform heights
This commit is contained in:
parent
de4216af66
commit
f36c8ec10a
|
|
@ -191,8 +191,11 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
instance = this;
|
instance = this;
|
||||||
List<RiqEntity> heightEvents = EventCaller.GetAllInGameManagerList("nightWalkAgb", new string[] { "height" });
|
List<RiqEntity> heightEvents = EventCaller.GetAllInGameManagerList("nightWalkAgb", new string[] { "height" });
|
||||||
|
List<RiqEntity> rollEvents = EventCaller.GetAllInGameManagerList("nightWalkAgb", new string[] { "roll" });
|
||||||
|
var validRollEvents = rollEvents.FindAll(x => IsValidRollCue(x));
|
||||||
foreach (var heightEvent in heightEvents)
|
foreach (var heightEvent in heightEvents)
|
||||||
{
|
{
|
||||||
|
if (validRollEvents.Count > 0 && validRollEvents.Find(x => heightEvent.beat >= x.beat + 1 && heightEvent.beat < x.beat + 2) != null) continue;
|
||||||
heightEntityEvents.Add(new HeightEvent()
|
heightEntityEvents.Add(new HeightEvent()
|
||||||
{
|
{
|
||||||
beat = heightEvent.beat,
|
beat = heightEvent.beat,
|
||||||
|
|
@ -219,7 +222,6 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
fishBeats.Add(fishEvent.beat);
|
fishBeats.Add(fishEvent.beat);
|
||||||
}
|
}
|
||||||
List<RiqEntity> rollEvents = EventCaller.GetAllInGameManagerList("nightWalkAgb", new string[] { "roll" });
|
|
||||||
foreach (var rollEvent in rollEvents)
|
foreach (var rollEvent in rollEvents)
|
||||||
{
|
{
|
||||||
rollBeats.Add(rollEvent.beat);
|
rollBeats.Add(rollEvent.beat);
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,10 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk
|
||||||
public void StartInput(double beat, double hitBeat)
|
public void StartInput(double beat, double hitBeat)
|
||||||
{
|
{
|
||||||
if (game == null) game = AgbNightWalk.instance;
|
if (game == null) game = AgbNightWalk.instance;
|
||||||
|
if (anim == null) anim = GetComponent<Animator>();
|
||||||
|
isRollPlatform = game.RollOnBeat(hitBeat);
|
||||||
lastAdditionalHeightInUnits = game.FindHeightUnitsAtBeat(hitBeat);
|
lastAdditionalHeightInUnits = game.FindHeightUnitsAtBeat(hitBeat);
|
||||||
additionalHeightInUnits = game.FindHeightUnitsAtBeat(hitBeat + 1);
|
additionalHeightInUnits = game.FindHeightUnitsAtBeat(hitBeat + (isRollPlatform ? 2 : 1));
|
||||||
additionalHeight = lastAdditionalHeightInUnits * handler.heightAmount;
|
additionalHeight = lastAdditionalHeightInUnits * handler.heightAmount;
|
||||||
nextPlatformIsSameHeight = lastAdditionalHeightInUnits == additionalHeightInUnits;
|
nextPlatformIsSameHeight = lastAdditionalHeightInUnits == additionalHeightInUnits;
|
||||||
isFinalBlock = hitBeat == game.endBeat + 1;
|
isFinalBlock = hitBeat == game.endBeat + 1;
|
||||||
|
|
@ -62,7 +64,7 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk
|
||||||
isFish = game.FishOnBeat(endBeat);
|
isFish = game.FishOnBeat(endBeat);
|
||||||
fish.gameObject.SetActive(isFish);
|
fish.gameObject.SetActive(isFish);
|
||||||
isEndEvent = game.endBeat == endBeat;
|
isEndEvent = game.endBeat == endBeat;
|
||||||
isRollPlatform = game.RollOnBeat(endBeat);
|
|
||||||
rollPlatform.transform.parent.gameObject.SetActive(isRollPlatform);
|
rollPlatform.transform.parent.gameObject.SetActive(isRollPlatform);
|
||||||
rollPlatformLong.SetActive(nextPlatformIsSameHeight && !isFinalBlock && !isEndEvent);
|
rollPlatformLong.SetActive(nextPlatformIsSameHeight && !isFinalBlock && !isEndEvent);
|
||||||
if (isEndEvent)
|
if (isEndEvent)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue