Packagecom.kraftner.justlineon.lineservers
Classpublic class AlwaysTurnImplosion
InheritanceAlwaysTurnImplosion Inheritance LineServer Inheritance flash.display.Sprite

This LineServer always starts from the boundaries of the Stage and moves until it hits the end of the stage or a certain distance from the center.

See also

com.kraftner.justlineon.lineservers.AlwaysTurn


Public Properties
 PropertyDefined by
 InheritedisAlive : Boolean
true if this LineServer is active
LineServer
Protected Properties
 PropertyDefined by
 Inheritedcounter : uint = 0
Counts the number of Segments already drawn
LineServer
 Inheritedinitial_angle : Number = 0
LineServer
 Inheritedinitial_length : Number = 0
LineServer
 Inheritedinitial_rel_x : Number = 0
LineServer
 Inheritedinitial_rel_y : Number = 0
LineServer
 Inheritedinitial_x : Number = 0
LineServer
 Inheritedinitial_y : Number = 0
LineServer
 Inheritedkillme : Boolean = false
Stores if this Lineserver is active or not.
LineServer
  newSegment : Segment
[read-only] This method defines the new Segment.
AlwaysTurnImplosion
 Inheritedprev_Segment : Segment
LineServer
Public Methods
 MethodDefined by
  
AlwaysTurnImplosion(length:Number, lengthMulti:Number, lengthAdd:Number, angleDegreeMin:Number, angleDegreeMax:Number, away:Number, breakInChance:Number, randomAbort:Number)
AlwaysTurnImplosion
 Inherited
addPainter(painter:Painter):void
Adds a Painter to this LineServer
LineServer
 Inherited
addPointTransformer(pointTransformer:PointTransformer):void
Adds a PointTransformer to this LineServer
LineServer
 Inherited
destroy():void
Contains Code to be executed when this LineServer is destroyed.
LineServer
 Inherited
dump():void
Dumps the content of all Painters in this LineServer to a Bitmap.
LineServer
 Inherited
step():Boolean
This method is called by the main application to trigger a new Segment.
LineServer
Property detail
newSegmentproperty
newSegment:Segment  [read-only]

This method defines the new Segment. It should be overwritten if you subclass your own LineServer.

Implementation
    protected function get newSegment():Segment
Constructor detail
AlwaysTurnImplosion()constructor
public function AlwaysTurnImplosion(length:Number, lengthMulti:Number, lengthAdd:Number, angleDegreeMin:Number, angleDegreeMax:Number, away:Number, breakInChance:Number, randomAbort:Number)

Parameters
length:Number — The length each line starts with. This is continually increased/decreased according to the following two parameters.
 
lengthMulti:Number — Factor by which the length of the previous Segment is multiplied to get the length of the new Segment.
 
lengthAdd:Number — Factor which is added to the length of the previous Segment to get the length of the new Segment. Can be negative as well.
 
angleDegreeMin:Number — Minimum angle the new Segment turns away from the direction of the previous Segment
 
angleDegreeMax:Number — Maximum angle the new Segment turns away from the direction of the previous Segment
 
away:Number — Minimum distance the line can be away from the center. This only applies in connection with the next parameter.
 
breakInChance:Number — Chance the line ignores the away parameter and moves on. This Chance is represented by a Number between 0 and 1, 0 beeing impossible to break in. This chance isn't a one time decision but is triggered on each Segment of the line again.
 
randomAbort:Number — Chance the line randomly aborts. This Chance is represented by a Number between 0 and 1, 0 meaning the line never randomly aborts and 1 meaning it always aborts. If you set this parameter to 1 the line won't draw at all.

See also