-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcamScriptMemLeak.hx
35 lines (33 loc) · 1002 Bytes
/
camScriptMemLeak.hx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function onMoveCamera(focus:String) {
camFollow.setPosition(700, 570);
}
function goodNoteHit(note:Note) {
camFollow.setPosition(700, 570);
if (PlayState.SONG.notes[game.curSection].mustHitSection) {
switch (boyfriend.animation.curAnim.name) {
case "singLEFT":
game.camFollow.x = game.camFollow.x - 30;
case "singRIGHT":
game.camFollow.x = game.camFollow.x + 30;
case "singUP":
game.camFollow.y = game.camFollow.y - 30;
case "singDOWN":
game.camFollow.y = game.camFollow.y + 30;
}
}
}
function opponentNoteHit(note:Note) {
camFollow.setPosition(700, 570);
if (!PlayState.SONG.notes[game.curSection].mustHitSection) {
switch (dad.animation.curAnim.name) {
case "singLEFT":
game.camFollow.x = game.camFollow.x - 30;
case "singRIGHT":
game.camFollow.x = game.camFollow.x + 30;
case "singUP":
game.camFollow.y = game.camFollow.y - 30;
case "singDOWN":
game.camFollow.y = game.camFollow.y + 30;
}
}
}