File tree Expand file tree Collapse file tree
play/src/engine/playData/archetypes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ export class Line extends Archetype {
4040 }
4141
4242 updateParallel ( ) {
43- debug . log ( this . import . SpawnBeat * 10000 + time . now )
4443 if ( this . despawnTime <= time . now ) this . despawn = true
4544 }
4645}
Original file line number Diff line number Diff line change @@ -46,12 +46,14 @@ export class LinePoint extends Archetype {
4646 shouldSpawn ( ) {
4747 return this . spawnTime <= time . now
4848 }
49- updateSequentialOrder = 10
5049
5150 updateSequential ( ) {
5251 this . pos . x = scaleX ( this . hitTime , this . import . Canvas )
5352 this . pos . y = scaleY ( this . import . YPos , this . import . Canvas )
54- this . lineY = this . updateLineYPos ( )
53+ if ( this . pos . x >= game . XMax ) {
54+ this . lineY = this . getLineYPos ( )
55+ archetypes . Line . pos . get ( this . import . Line ) . y = this . lineY
56+ }
5557 }
5658
5759
@@ -86,13 +88,11 @@ export class LinePoint extends Archetype {
8688 skin . sprites . draw ( spriteId , layout , 100 , alpha )
8789 }
8890
89- updateLineYPos ( ) : number {
91+ getLineYPos ( ) : number {
9092 const n = archetypes . LinePoint . pos . get ( this . import . NextPoint )
9193 const t = Math . clamp ( ( game . XMax - this . pos . x ) / ( n . x - this . pos . x ) , 0 , 1 )
9294 const e = ease ( t , this . import . EaseType )
93- const y = /**(this.pos.x === n.x) ? this.pos.y :*/ this . pos . y + e * ( n . y - this . pos . y )
94- archetypes . Line . pos . get ( this . import . Line ) . y = y
95- return y
95+ return this . pos . y + e * ( n . y - this . pos . y )
9696 }
9797
9898 updateParallel ( ) {
Original file line number Diff line number Diff line change @@ -76,8 +76,7 @@ export class HoldEndNote extends Archetype {
7676
7777 getPos ( ) {
7878 const lineY = archetypes . Line . pos . get ( this . import . Line ) . y //TODO - not working
79- // this.pos.y = (time.now <= this.startTime) ? this.sharedMemory.fakeY : lineY
80- this . pos . y = this . sharedMemory . fakeY
79+ this . pos . y = ( time . now <= this . startTime ) ? this . sharedMemory . fakeY : lineY
8180
8281 const StartExist = entityInfos . get ( this . import . HoldStart ) . state == EntityState . Active
8382 this . pos . xStart = StartExist ? archetypes . HoldNote . sharedMemory . get ( this . import . HoldStart ) . pos . x : game . XMax
You can’t perform that action at this time.
0 commit comments