@@ -215,6 +215,8 @@ class PlayState extends ScriptState
215215 {
216216 super .update (elapsed );
217217
218+ strumLines .update ();
219+
218220 callOnScripts (' onUpdate' , [elapsed ]);
219221
220222 var firsEvent = events [0 ];
@@ -498,20 +500,20 @@ class PlayState extends ScriptState
498500 switch (type )
499501 {
500502 case OPPONENT :
501- STAGE .opponentsPosition [characters .opponents .members . length ][0 ];
503+ STAGE .opponentsPosition [characters .opponents .length ][0 ];
502504 case PLAYER :
503- STAGE .playersPosition [characters .players .members . length ][0 ];
505+ STAGE .playersPosition [characters .players .length ][0 ];
504506 case EXTRA :
505- STAGE .extrasPosition [characters .extras .members . length ][0 ];
507+ STAGE .extrasPosition [characters .extras .length ][0 ];
506508 },
507509 switch (type )
508510 {
509511 case OPPONENT :
510- STAGE .opponentsPosition [characters .opponents .members . length ][1 ];
512+ STAGE .opponentsPosition [characters .opponents .length ][1 ];
511513 case PLAYER :
512- STAGE .playersPosition [characters .players .members . length ][1 ];
514+ STAGE .playersPosition [characters .players .length ][1 ];
513515 case EXTRA :
514- STAGE .extrasPosition [characters .extras .members . length ][1 ];
516+ STAGE .extrasPosition [characters .extras .length ][1 ];
515517 },
516518 character [0 ], cast character [1 ]
517519 );
@@ -523,23 +525,23 @@ class PlayState extends ScriptState
523525 switch (type )
524526 {
525527 case PLAYER :
526- if (characters .players .members . length <= 0 )
528+ if (characters .players .length <= 0 )
527529 {
528530 playerIconName = object .data .icon ;
529531 playerColor = FlxColor .fromRGB (objectColor [0 ], objectColor [1 ], objectColor [2 ]);
530532 }
531533
532- characters .players .add (object );
534+ characters .players .push (object );
533535 case OPPONENT :
534- if (characters .opponents .members . length <= 0 )
536+ if (characters .opponents .length <= 0 )
535537 {
536538 opponentIconName = object .data .icon ;
537539 opponentColor = FlxColor .fromRGB (objectColor [0 ], objectColor [1 ], objectColor [2 ]);
538540 }
539541
540- characters .opponents .add (object );
542+ characters .opponents .push (object );
541543 case EXTRA :
542- characters .extras .add (object );
544+ characters .extras .push (object );
543545 }
544546
545547 add (object );
@@ -634,11 +636,11 @@ class PlayState extends ScriptState
634636 switch (character .type )
635637 {
636638 case PLAYER :
637- strumLines .players .add (strl );
639+ strumLines .players .push (strl );
638640 case OPPONENT :
639- strumLines .opponents .add (strl );
641+ strumLines .opponents .push (strl );
640642 case EXTRA :
641- strumLines .extras .add (strl );
643+ strumLines .extras .push (strl );
642644 }
643645
644646 add (strl );
@@ -1086,29 +1088,32 @@ class PlayState extends ScriptState
10861088 {
10871089 var char : Character = charactersArray [SONG .sections [section ].focus ];
10881090
1089- switch (char . type )
1091+ if (char != null )
10901092 {
1091- case OPPONENT :
1092- camPosition .x = char .getMidpoint ().x + 150 ;
1093- camPosition .x + = char .cameraPosition [0 ];
1094- camPosition .x + = STAGE .opponentsCamera [characters .opponents .members .indexOf (char )][0 ];
1095- camPosition .y = char .getMidpoint ().y - 100 ;
1096- camPosition .y + = char .cameraPosition [1 ];
1097- camPosition .y + = STAGE .opponentsCamera [characters .opponents .members .indexOf (char )][1 ];
1098- case PLAYER :
1099- camPosition .x = char .getMidpoint ().x - 100 ;
1100- camPosition .x - = char .cameraPosition [0 ];
1101- camPosition .x + = STAGE .playersCamera [characters .players .members .indexOf (char )][0 ];
1102- camPosition .y = char .getMidpoint ().y - 100 ;
1103- camPosition .y + = char .cameraPosition [1 ];
1104- camPosition .y + = STAGE .playersCamera [characters .players .members .indexOf (char )][1 ];
1105- case EXTRA :
1106- camPosition .x = char .getMidpoint ().x ;
1107- camPosition .x + = char .cameraPosition [0 ];
1108- camPosition .x + = STAGE .extrasCamera [characters .extras .members .indexOf (char )][0 ];
1109- camPosition .y = char .getMidpoint ().y ;
1110- camPosition .y + = char .cameraPosition [1 ];
1111- camPosition .y + = STAGE .extrasCamera [characters .extras .members .indexOf (char )][1 ];
1093+ switch (char .type )
1094+ {
1095+ case OPPONENT :
1096+ camPosition .x = char .getMidpoint ().x + 150 ;
1097+ camPosition .x + = char .cameraPosition [0 ];
1098+ camPosition .x + = STAGE .opponentsCamera [characters .opponents .indexOf (char )][0 ];
1099+ camPosition .y = char .getMidpoint ().y - 100 ;
1100+ camPosition .y + = char .cameraPosition [1 ];
1101+ camPosition .y + = STAGE .opponentsCamera [characters .opponents .indexOf (char )][1 ];
1102+ case PLAYER :
1103+ camPosition .x = char .getMidpoint ().x - 100 ;
1104+ camPosition .x - = char .cameraPosition [0 ];
1105+ camPosition .x + = STAGE .playersCamera [characters .players .indexOf (char )][0 ];
1106+ camPosition .y = char .getMidpoint ().y - 100 ;
1107+ camPosition .y + = char .cameraPosition [1 ];
1108+ camPosition .y + = STAGE .playersCamera [characters .players .indexOf (char )][1 ];
1109+ case EXTRA :
1110+ camPosition .x = char .getMidpoint ().x ;
1111+ camPosition .x + = char .cameraPosition [0 ];
1112+ camPosition .x + = STAGE .extrasCamera [characters .extras .indexOf (char )][0 ];
1113+ camPosition .y = char .getMidpoint ().y ;
1114+ camPosition .y + = char .cameraPosition [1 ];
1115+ camPosition .y + = STAGE .extrasCamera [characters .extras .indexOf (char )][1 ];
1116+ }
11121117 }
11131118 }
11141119
0 commit comments