home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 145
/
MOBICLIC145.ISO
/
pc
/
DATA
/
DSS145
/
DSS145_12
/
DSS145_12.swf
/
scripts
/
dss145_12
/
AttackSequence.as
next >
Wrap
Text File
|
2012-07-19
|
3KB
|
83 lines
package dss145_12
{
import flash.geom.Point;
public class AttackSequence
{
public var timeActual:Number = 0;
public var params:Object;
public var attacks:Array;
public function AttackSequence()
{
this.attacks = [];
super();
}
public function add(param1:Object) : void
{
var _loc3_:Number = NaN;
var _loc4_:Point = null;
param1.done = false;
if(param1.speedX != undefined && param1.speedX != 0)
{
if(param1.speedX > 0)
{
param1.startPoint = new Point(param1.repere.x,param1.repere.y);
param1.endPoint = new Point(param1.repere.x + param1.repere.width,param1.repere.y);
}
else
{
param1.startPoint = new Point(param1.repere.x + param1.repere.width,param1.repere.y);
param1.endPoint = new Point(param1.repere.x,param1.repere.y);
}
}
if(param1.speedY != undefined && param1.speedY != 0)
{
if(param1.speedY > 0)
{
if(param1.type == "LAVE")
{
_loc3_ = Math.random() * 700 + 50;
_loc4_ = new Point(_loc3_,-50);
(_loc4_ = param1.repere.parent.globalToLocal(_loc4_)).x = _loc3_;
param1.startPoint = _loc4_;
_loc4_ = new Point(_loc3_,700);
(_loc4_ = param1.repere.parent.globalToLocal(_loc4_)).x = _loc3_;
param1.endPoint = _loc4_;
}
else
{
param1.startPoint = new Point(param1.repere.x,param1.repere.y);
param1.endPoint = new Point(param1.repere.x,param1.repere.y + param1.repere.height);
}
}
else
{
param1.startPoint = new Point(param1.repere.x,param1.repere.y + param1.repere.height);
param1.endPoint = new Point(param1.repere.x,param1.repere.y);
}
}
var _loc2_:Boolean = param1.convertOnlyWithoutAdd == undefined ? false : true;
if(_loc2_ == false)
{
this.attacks.push(param1);
}
}
public function reset() : void
{
var _loc1_:int = 0;
while(_loc1_ < this.attacks.length)
{
this.attacks[_loc1_].done = false;
_loc1_++;
}
}
}
}