initial commit, kind of working.
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
package com.arc.dh.menu
|
||||
{
|
||||
import com.arc.dh.util.Data;
|
||||
import com.arc.dh.util.Fonts;
|
||||
import com.arc.flixel.ArcSprite;
|
||||
import org.flixel.FlxBitmapText;
|
||||
import org.flixel.FlxG;
|
||||
import org.flixel.FlxPoint;
|
||||
|
||||
public class CharacterPane extends MenuPane
|
||||
{
|
||||
|
||||
private static const sprite:Class = CharacterPane_sprite;
|
||||
|
||||
private static const heartMeterSprite:Class = CharacterPane_heartMeterSprite;
|
||||
|
||||
private var _diamonds:FlxBitmapText;
|
||||
|
||||
private var _skills:Array = new Array();
|
||||
|
||||
private var _guns:Array = new Array();
|
||||
|
||||
private var _heartmeter:ArcSprite = new ArcSprite();
|
||||
|
||||
public function CharacterPane()
|
||||
{
|
||||
var _loc3_:String = null;
|
||||
var _loc4_:Array = null;
|
||||
var _loc5_:int = 0;
|
||||
var _loc6_:GunComponent = null;
|
||||
var _loc7_:SkillMeter = null;
|
||||
var _loc8_:Array = null;
|
||||
var _loc9_:Equipment = null;
|
||||
super(1,1,sprite);
|
||||
var _loc1_:Array = ["agility","jump","attract","recover","aegis","defense"];
|
||||
var _loc2_:int = 43;
|
||||
for each(_loc3_ in _loc1_)
|
||||
{
|
||||
_loc7_ = new SkillMeter(14,_loc2_,_loc3_);
|
||||
this.add(_loc7_);
|
||||
this._skills.push(_loc7_);
|
||||
_loc2_ += 10;
|
||||
}
|
||||
_loc4_ = [["autofirer","Autofire"],["lasersight","Laser Sight"],["skyboots","Sky Boots"],["moltensuit","Molten Suit"],["moonboots","Moon Boots"],["prime","Prime Gun"],["spreader","Spreader Gun"],["missile","Missile Gun"],["rebound","Rebound Gun"],["xrayscope","X-Ray Scope"]];
|
||||
_loc5_ = 0;
|
||||
while(_loc5_ < _loc4_.length)
|
||||
{
|
||||
_loc8_ = _loc4_[_loc5_] as Array;
|
||||
_loc9_ = new Equipment(_loc5_,_loc8_[1] as String,_loc8_[0] as String);
|
||||
this.add(_loc9_);
|
||||
_loc5_++;
|
||||
}
|
||||
this._diamonds = new FlxBitmapText(26,195,Fonts.font(Fonts.SMALL_WHITE),Data.diamonds + " DIAMONDS","center",99);
|
||||
this.add(this._diamonds);
|
||||
this._heartmeter = new ArcSprite(33,23);
|
||||
this._heartmeter.loadGraphic(heartMeterSprite,true,false,103,7);
|
||||
this.add(this._heartmeter);
|
||||
_loc6_ = new GunComponent(150,21,"primegun","prime");
|
||||
this._guns.push(_loc6_);
|
||||
this.add(_loc6_);
|
||||
_loc6_ = new GunComponent(250,21,"spreadergun","spreader");
|
||||
this._guns.push(_loc6_);
|
||||
this.add(_loc6_);
|
||||
_loc6_ = new GunComponent(150,114,"missilegun","missile");
|
||||
this._guns.push(_loc6_);
|
||||
this.add(_loc6_);
|
||||
_loc6_ = new GunComponent(250,114,"reboundgun","rebound");
|
||||
this._guns.push(_loc6_);
|
||||
this.add(_loc6_);
|
||||
this.sync();
|
||||
setAll("scrollFactor",new FlxPoint(0,0));
|
||||
}
|
||||
|
||||
public function clickTryAgain() : void
|
||||
{
|
||||
}
|
||||
|
||||
public function clickMenu() : void
|
||||
{
|
||||
}
|
||||
|
||||
override public function sync(param1:Boolean = false) : void
|
||||
{
|
||||
var _loc2_:SkillMeter = null;
|
||||
var _loc3_:GunComponent = null;
|
||||
this._heartmeter.frame = Data.hpm;
|
||||
this._diamonds.text = Data.diamonds + " DIAMONDS";
|
||||
for each(_loc2_ in this._skills)
|
||||
{
|
||||
_loc2_.sync();
|
||||
}
|
||||
for each(_loc3_ in this._guns)
|
||||
{
|
||||
_loc3_.sync();
|
||||
}
|
||||
}
|
||||
|
||||
override public function update() : void
|
||||
{
|
||||
if(this._heartmeter.hover())
|
||||
{
|
||||
if(Menu.tooltip == null || Menu.tooltip.source != this)
|
||||
{
|
||||
Menu.tooltip = new MenuTooltip(this._heartmeter.x + this._heartmeter.width / 2,this._heartmeter.y,"Heart Crystals Obtained",Data.vitality + " of 17");
|
||||
Menu.tooltip.source = this;
|
||||
}
|
||||
Menu.hovering = true;
|
||||
}
|
||||
super.update();
|
||||
if(FlxG.mouse.justPressed())
|
||||
{
|
||||
this.sync();
|
||||
}
|
||||
}
|
||||
|
||||
public function tooltip(param1:String, param2:String = "left") : void
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user