mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-01-20 12:44:59 +00:00
30 lines
756 B
C#
30 lines
756 B
C#
$DemoCycleDelay = 6000;
|
|
|
|
function DemoEndGui::onWake(%this)
|
|
{
|
|
%this.index = 1;
|
|
new ActionMap( DemoEndMap );
|
|
DemoEndMap.bindCmd( mouse, button0, "DemoEndGui.forceBitmapCycle();", "" );
|
|
DemoEndMap.bindCmd( keyboard, space, "DemoEndGui.forceBitmapCycle();", "" );
|
|
DemoEndMap.push();
|
|
%this.cycleTimer = %this.schedule($DemoCycleDelay, cycleBitmaps);
|
|
}
|
|
|
|
function DemoEndGui::cycleBitmaps(%this)
|
|
{
|
|
if (%this.index == 3)
|
|
quit();
|
|
else
|
|
{
|
|
%this.index++;
|
|
%this.setBitmap("gui/bg_DemoEnd" @ %this.index);
|
|
%this.cycleTimer = %this.schedule( $DemoCycleDelay, cycleBitmaps );
|
|
}
|
|
}
|
|
|
|
function DemoEndGui::forceBitmapCycle( %this )
|
|
{
|
|
cancel( %this.cycleTimer );
|
|
%this.cycleBitmaps();
|
|
}
|