ironsphererpg/scripts/DemoEndGui.cs
Jusctsch5 a5143b67f7 T2RPG: Initial commit of ironsphererpg directory
Taking everything obtained from http://ironsphererpg2.webs.com/ and dumping it in a git repo
2015-01-18 21:06:06 -06:00

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();
}