-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTemplateScript.hx
More file actions
237 lines (159 loc) · 5.01 KB
/
TemplateScript.hx
File metadata and controls
237 lines (159 loc) · 5.01 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
//for every song, put it in the songs folder
//for a specific song, put it in songs/yoursong/scripts/scriptName.hx
function create() { //called on first frame, some things may not be loaded
}
function postCreate() { //called after everything is about loaded
}
function update(elapsed) {
}
function postUpdate(elapsed) {
}
function onInputUpdate(event) {
/*
event.pressed
* Array containing whenever a specific control is pressed or not.
* For example, `pressed[0]` will return whenever the left strum was pressed.
event.justPressed
* Array containing whenever a specific control was pressed (not hold) this frame or not.
* For example, `justPressed[0]` will return whenever the left strum was just pressed.
event.justReleased
* Array containing whenever a specific control was released this frame or not.
* For example, `justReleased[0]` will return whenever the left strum was just released.
event.strumLine
* Strumline which input is being processed.
event.strumLineID
* ID of the Strumline.
*/
}
function onPostInputUpdate() {
}
function onStrumCreation(event) {
}
function onStartCountdown() { //called when the countdown is starter
}
function onCountdown(c) { //called each time the countdown is called
/*
c.swagCounter - The Number its on
0 - "Three"
1 - "Two"
2 - "One"
3 - "Go"
$ - (Empty)
c.volume - the volume, simple enough
c.soundPath - The path the sound will be used
c.spritePath - The path it gets the sprite from
c.scale - Self Explanitory, changes the scale
c.antialiasing - Whether its blurry or non blurry
you can cancel this function by going:
c.cancel(true);
*/
}
function onPostCountdown(c) {//called after each time the countdown is called
/*
c.sprite - The FlxSprite used
c.spriteTween - The tween called for the sprite
c.sound - The FlxSound used for it
you can cancel this function by going:
c.cancel(true);
*/
}
function onPostStartCountdown() { //called after the countdown is done
}
function onSongStart() { //called when the song starts
}
function onStartSong() { //also called when the song starts?? idk what this is for
}
function onCameraMove(e) {
/*
e.position - the final position
e.strumLine - strumline it focuses on
e.focusedCharacters - the amount of characters its focused on
*/
}
function onRatingUpdate(e) { //called when the ratings change
/*
e.rating.percent - the accuracy needed
e.rating.rating - the text used, example would be "S++"
e.rating.color - Color used for the rating
e.curRating.percent - the old combo rating percent
e.curRating.rating - old combo text used, example would be "S++"
e.curRating.color - old Color used for the rating
*/
}
function onEvent(e) {
//called when you load an event, simple enough
//e.name; - name of the event called
//e.params - the params used, an array
}
function onGameOver(e) {
/**
* The X pos of where the gameover character will be.
e.x;
* The Y pos of where the gameover character will be.
e.y;
* Character which died. Default to `boyfriend`.
e.character;
* Character ID (name) for game over. Default to whatever is specified in the character's XML.
e.deathCharID;
* If the character has isPlayer
e.isPlayer;
* Song for the game over screen. Default to `this.gameOverSong` (`gameOver`)
e.gameOverSong;
* SFX at the beginning of the game over (Mic drop). Default to `this.lossSFX` (`gameOverSFX`)
e.lossSFX;
* SFX played whenever the player retries. Defaults to `retrySFX` (`gameOverEnd`)
e.retrySFX;
*/
}
function onPostGameOver(e) {
/**
* The X pos of where the gameover character will be.
e.x;
* The Y pos of where the gameover character will be.
e.y;
* Character which died. Default to `boyfriend`.
e.character;
* Character ID (name) for game over. Default to whatever is specified in the character's XML.
e.deathCharID;
* If the character has isPlayer
e.isPlayer;
* Song for the game over screen. Default to `this.gameOverSong` (`gameOver`)
e.gameOverSong;
* SFX at the beginning of the game over (Mic drop). Default to `this.lossSFX` (`gameOverSFX`)
e.lossSFX;
* SFX played whenever the player retries. Defaults to `retrySFX` (`gameOverEnd`)
e.retrySFX;
*/
}
function onSongEnd() {
}
function onPlayerMiss(e) {
}
function onPlayerHit(e) {
}
function onDadHit(e) {
}
function onNoteHit(e) {
}
function beatHit(curBeat) {
}
function stepHit(curStep) {
}
function measureHit(curMeasure) {
}
function onSubstateOpen(substate) { //called when a substate is opened
}
function onSubstateClose(substate) { //called when a substate is closed
}
function onFocus() { //called when the game is focused on again
}
function onFocusLost() { //called when you click out of the game
}
function draw(e) { //i dont know what this is for, the event doesnt have any variables
}
function postDraw(e) { //called after draw, again dont know
}
function onVocalsResync() { //when the vocals resync
}
function onGamePause(e) { //called when the game pauses, can be cancelled
}