initial commit, kind of working.
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
package com.arc.dh.state
|
||||
{
|
||||
import com.arc.dh.util.Config;
|
||||
import com.arc.flixel.ArcButton;
|
||||
import com.arc.flixel.ArcSprite;
|
||||
import flash.events.MouseEvent;
|
||||
import org.flixel.FlxG;
|
||||
import org.flixel.FlxU;
|
||||
|
||||
public class CreditsScreen extends MenuScreen
|
||||
{
|
||||
|
||||
private static const sprite:Class = CreditsScreen_sprite;
|
||||
|
||||
private static const buttonHomepageSprite:Class = CreditsScreen_buttonHomepageSprite;
|
||||
|
||||
private var _credits:ArcSprite;
|
||||
|
||||
private var _buttonBack:ArcButton;
|
||||
|
||||
private var _buttonPegas:ArcButton;
|
||||
|
||||
private var _homepageButton:ArcButton;
|
||||
|
||||
public function CreditsScreen(param1:MainMenu)
|
||||
{
|
||||
var M:MainMenu = param1;
|
||||
super(M);
|
||||
this._buttonBack = new ArcButton(265,210,87,26,StoryScreen.buttonBackSprite).callback(function():void
|
||||
{
|
||||
menu.switchScreen(menu.mainScreen);
|
||||
}).selectable(false);
|
||||
this.add(this._buttonBack);
|
||||
this._homepageButton = new ArcButton(2,91,40,28,buttonHomepageSprite).callback(function():void
|
||||
{
|
||||
FlxU.openURL("http://iarke.us");
|
||||
}).selectable(false);
|
||||
this.add(this._homepageButton);
|
||||
if(Config.RELEASE == Config.PEGAS)
|
||||
{
|
||||
this._buttonPegas = new ArcButton(245,90,106,46,MainScreen.buttonPegas).callback(function():void
|
||||
{
|
||||
}).selectable(false);
|
||||
this.add(this._buttonPegas);
|
||||
}
|
||||
else if(Config.RELEASE == Config.ARMORGAMES)
|
||||
{
|
||||
this._buttonPegas = new ArcButton(215,90,133,39,MainScreen.buttonAG).callback(function():void
|
||||
{
|
||||
FlxU.openURL("http://armorgames.com");
|
||||
}).selectable(false);
|
||||
this.add(this._buttonPegas);
|
||||
}
|
||||
this._credits = new ArcSprite(0,0,sprite);
|
||||
this.add(this._credits);
|
||||
}
|
||||
|
||||
public function bindPegas() : void
|
||||
{
|
||||
if(Config.RELEASE != Config.PEGAS)
|
||||
{
|
||||
return;
|
||||
}
|
||||
FlxG.stage.addEventListener(MouseEvent.CLICK,this.pegasCredits);
|
||||
}
|
||||
|
||||
public function unbindPegas() : void
|
||||
{
|
||||
if(Config.RELEASE != Config.PEGAS)
|
||||
{
|
||||
return;
|
||||
}
|
||||
FlxG.stage.removeEventListener(MouseEvent.CLICK,this.pegasCredits);
|
||||
}
|
||||
|
||||
private function pegasCredits(param1:*) : void
|
||||
{
|
||||
if(Config.RELEASE != Config.PEGAS)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(this._buttonPegas.hover())
|
||||
{
|
||||
FlxU.openURL("http://www.pegasgames.com/");
|
||||
}
|
||||
}
|
||||
|
||||
override public function update() : void
|
||||
{
|
||||
if(FlxG.keys.justPressed("ESCAPE"))
|
||||
{
|
||||
menu.switchScreen(menu.mainScreen);
|
||||
}
|
||||
super.update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user