TrackManiaControl/application/core/Libs/FML/Script/Parts/Main.txt

34 lines
670 B
Plaintext
Raw Normal View History

2013-11-28 07:30:00 +01:00
Void Dummy() {}
main() {
2013-12-31 02:55:19 +01:00
declare FML_ScriptStart = Now;
+++OnInit+++
2013-12-31 02:55:19 +01:00
declare FML_LoopCounter = 0;
2014-02-16 13:59:28 +01:00
declare FML_LastTick = 0;
while (True) {
yield;
foreach (Event in PendingEvents) {
switch (Event.Type) {
case CMlEvent::Type::EntrySubmit: {
+++EntrySubmit+++
}
case CMlEvent::Type::KeyPress: {
+++KeyPress+++
}
case CMlEvent::Type::MouseClick: {
+++MouseClick+++
}
case CMlEvent::Type::MouseOut: {
+++MouseOut+++
}
case CMlEvent::Type::MouseOver: {
+++MouseOver+++
}
}
}
2013-12-31 02:55:19 +01:00
FML_LoopCounter += 1;
2014-02-16 13:59:28 +01:00
+++Loop+++
if (FML_LastTick + 250 > Now) continue;
FML_LastTick = Now;
+++Tick+++
}
2013-12-31 02:55:19 +01:00
}