disable pillars

This commit is contained in:
Rapandrasmus 2024-01-25 19:59:07 +01:00
parent ae1269876f
commit 5523a9c61c
3 changed files with 165 additions and 7 deletions

View file

@ -470,7 +470,7 @@ TextureImporter:
width: 128 width: 128
height: 124 height: 124
alignment: 0 alignment: 0
pivot: {x: 0, y: 0} pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
outline: [] outline: []
physicsShape: [] physicsShape: []
@ -491,7 +491,7 @@ TextureImporter:
width: 81 width: 81
height: 96 height: 96
alignment: 0 alignment: 0
pivot: {x: 0, y: 0} pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
outline: [] outline: []
physicsShape: [] physicsShape: []
@ -512,7 +512,7 @@ TextureImporter:
width: 51 width: 51
height: 86 height: 86
alignment: 0 alignment: 0
pivot: {x: 0, y: 0} pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
outline: [] outline: []
physicsShape: [] physicsShape: []
@ -533,7 +533,7 @@ TextureImporter:
width: 103 width: 103
height: 100 height: 100
alignment: 0 alignment: 0
pivot: {x: 0, y: 0} pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
outline: [] outline: []
physicsShape: [] physicsShape: []
@ -554,7 +554,7 @@ TextureImporter:
width: 114 width: 114
height: 105 height: 105
alignment: 0 alignment: 0
pivot: {x: 0, y: 0} pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
outline: [] outline: []
physicsShape: [] physicsShape: []
@ -566,6 +566,132 @@ TextureImporter:
indices: indices:
edges: [] edges: []
weights: [] weights: []
- serializedVersion: 2
name: totemclimb_0
rect:
serializedVersion: 2
x: 1787
y: 2324
width: 318
height: 167
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: c0aec637a506ff04d95c9e8236a289da
internalID: -1668053100
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: totemclimb_1
rect:
serializedVersion: 2
x: 122
y: 1852
width: 370
height: 291
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 0730594305e970745be382bf6efdacf7
internalID: 989580983
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: totemclimb_2
rect:
serializedVersion: 2
x: 806
y: 1925
width: 177
height: 145
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 22678479ff6868844bf7e4f7936d3b45
internalID: 111976072
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: totemclimb_3
rect:
serializedVersion: 2
x: 1461
y: 921
width: 1176
height: 475
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: d9187592046c53840a701166fcea7914
internalID: 748892238
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: totemclimb_4
rect:
serializedVersion: 2
x: 100
y: 276
width: 1249
height: 549
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: fbd7acc4bcce2754481c46d10fafaa7d
internalID: 574925212
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: totemclimb_5
rect:
serializedVersion: 2
x: 1424
y: 275
width: 1249
height: 508
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 255356bc8ef80944fb6f69aef56b4963
internalID: 1437042686
vertices: []
indices:
edges: []
weights: []
outline: [] outline: []
physicsShape: [] physicsShape: []
bones: [] bones: []
@ -596,6 +722,12 @@ TextureImporter:
totem0: 1921032003 totem0: 1921032003
totem1: 1031057130 totem1: 1031057130
totem2: 2141254573 totem2: 2141254573
totemclimb_0: -1668053100
totemclimb_1: 989580983
totemclimb_2: 111976072
totemclimb_3: 748892238
totemclimb_4: 574925212
totemclimb_5: 1437042686
wing2: -500930693 wing2: -500930693
wingleft: -591290891 wingleft: -591290891
wingright: -470877788 wingright: -470877788

View file

@ -35,6 +35,7 @@ namespace HeavenStudio.Games.Scripts_TotemClimb
private void Awake() private void Awake()
{ {
gameObject.SetActive(!GetStartBeatParam());
_scrollTransform = transform.parent; _scrollTransform = transform.parent;
_endDistance = ((float)GetBeatDistance() * 1.45f) + _pillarStartY; _endDistance = ((float)GetBeatDistance() * 1.45f) + _pillarStartY;
@ -148,6 +149,25 @@ namespace HeavenStudio.Games.Scripts_TotemClimb
if (allPillarEnds.Count == 0) return double.MaxValue; if (allPillarEnds.Count == 0) return double.MaxValue;
return allPillarEnds[0].beat - startBeat; return allPillarEnds[0].beat - startBeat;
} }
private bool GetStartBeatParam()
{
var allGameSwitches = EventCaller.GetAllInGameManagerList("gameManager", new string[] { "switchGame" }).FindAll(x => x.beat <= Conductor.instance.songPositionInBeatsAsDouble && x.datamodel is "gameManager/switchGame/totemClimb");
double lastGameSwitchBeat = 0;
if (allGameSwitches.Count > 0) lastGameSwitchBeat = allGameSwitches[^1].beat;
var nextGameSwitches = EventCaller.GetAllInGameManagerList("gameManager", new string[] { "switchGame" }).FindAll(x => x.beat > lastGameSwitchBeat && x.datamodel != "gameManager/switchGame/totemClimb");
double nextGameSwitchBeat = double.MaxValue;
if (nextGameSwitches.Count > 0)
{
nextGameSwitchBeat = nextGameSwitches[0].beat;
}
var allStarts = EventCaller.GetAllInGameManagerList("totemClimb", new string[] { "start" }).FindAll(x => x.beat >= lastGameSwitchBeat && x.beat < nextGameSwitchBeat);
if (allStarts.Count == 0) return false;
return allStarts[0]["hide"];
}
} }
} }

View file

@ -18,7 +18,10 @@ namespace HeavenStudio.Games.Loaders
{ {
new("start", "Start Jumping") new("start", "Start Jumping")
{ {
parameters = new List<Param>()
{
new("hide", false, "Hide Pillars")
}
}, },
new("triple", "Triple Jumping") new("triple", "Triple Jumping")
{ {
@ -60,7 +63,10 @@ namespace HeavenStudio.Games.Loaders
}, },
new("stop", "Stop Jumping") new("stop", "Stop Jumping")
{ {
parameters = new List<Param>()
{
new("anim", true, "Has Ending Animation")
}
}, },
new("bop", "Bop") new("bop", "Bop")
{ {