Applications
Typing features - indicator.
Pathfinding - diagnosis drawing.
Info panel decorations.
code
in this case, color = white, opacity = 100%. thickness = 2 as default values.
package scripts;
import com.stencyl.Engine;
import flash.display.Graphics;
class Dline
{
public var color:Int = 16777215; public var alpha:Float =1; public var thick:Int =2;
public var graph:Graphics = Engine.engine.transitionLayer.graphics;
public function new(){}
public function draw(start_x,start_y,end_x,end_y)
{
this.graph.lineStyle(this.thick,this.color,this.alpha);
this.graph.moveTo(start_x,start_y);
this.graph.lineTo(end_x,end_y);
this.graph.lineStyle(); //end graphics.
}
}
No comments:
Post a Comment