TrackManiaControl/application/core/Libs/FML/Script/Parts/Main.txt
2014-05-01 17:35:23 +02:00

34 lines
670 B
Plaintext

Void Dummy() {}
main() {
declare FML_ScriptStart = Now;
+++OnInit+++
declare FML_LoopCounter = 0;
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+++
}
}
}
FML_LoopCounter += 1;
+++Loop+++
if (FML_LastTick + 250 > Now) continue;
FML_LastTick = Now;
+++Tick+++
}
}