initial commit, kind of working.
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
package com.arc.flixel
|
||||
{
|
||||
import flash.geom.Rectangle;
|
||||
import org.flixel.FlxG;
|
||||
import org.flixel.FlxPoint;
|
||||
import org.flixel.FlxSprite;
|
||||
|
||||
public class ArcSprite extends FlxSprite
|
||||
{
|
||||
|
||||
protected var _colorRed:Number = 1;
|
||||
|
||||
protected var _colorGreen:Number = 1;
|
||||
|
||||
protected var _colorBlue:Number = 1;
|
||||
|
||||
protected var _deathTimer:Number = 0;
|
||||
|
||||
public function ArcSprite(param1:Number = 0, param2:Number = 0, param3:Class = null)
|
||||
{
|
||||
super(param1,param2,param3);
|
||||
}
|
||||
|
||||
public function hover() : Boolean
|
||||
{
|
||||
var _loc1_:FlxPoint = getScreenXY();
|
||||
return new ArcRect(_loc1_.x,_loc1_.y,width,height).hover();
|
||||
}
|
||||
|
||||
public function offScreen() : Boolean
|
||||
{
|
||||
var _loc1_:FlxPoint = getScreenXY();
|
||||
return _loc1_.x < -width || _loc1_.x > FlxG.width || _loc1_.y < -height || _loc1_.y > FlxG.height;
|
||||
}
|
||||
|
||||
public function get sourceRect() : Rectangle
|
||||
{
|
||||
return _flashRect;
|
||||
}
|
||||
|
||||
public function set sourceRect(param1:Rectangle) : void
|
||||
{
|
||||
_flashRect = param1;
|
||||
}
|
||||
|
||||
public function mark(param1:Number) : void
|
||||
{
|
||||
this._deathTimer = param1;
|
||||
}
|
||||
|
||||
override public function update() : void
|
||||
{
|
||||
if(this._deathTimer > 0)
|
||||
{
|
||||
this._deathTimer -= FlxG.elapsed;
|
||||
if(this._deathTimer <= 0)
|
||||
{
|
||||
kill();
|
||||
}
|
||||
}
|
||||
super.update();
|
||||
}
|
||||
|
||||
public function get animation() : String
|
||||
{
|
||||
return _curAnim.name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user