All pastes #2067050 Raw Edit

Stuff

public text v1 · immutable
#2067050 ·published 2011-05-22 17:21 UTC
rendered paste body
package  
{
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Shape;
	import flash.geom.Matrix;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	import org.flixel.*;
		
	public class newBullet extends FlxSprite 
	{
			[Embed(source = "/fire.png")] private var line:Class;
		public var team = 0;
		public var counts = 0;
	
		
		public function newBullet(type, x, y, angle, counts, id,target) 
		{
	
	var widthx = FlxU.getDistance(new FlxPoint(x, y), target);
	if (widthx > 100) { widthx = 100 }
	var leftx = 100 - widthx;

		this.loadGraphic(line, false, false,widthx, 1);
			this.team = type;
			this.ID = id;
			this.counts = counts;
			this.y = y;  this.x = x;  this.offset.x = (widthx / 2);
		
			
		
		
this.angle = FlxU.getAngle(new FlxPoint(x, y), target) - 90;	

		
	
			this.mass = 0;
			
			this.immovable = true;
		
		trace("shooting a line");

	//	//	this.antialiasing = true;
		//	if (team == 0) { this.color = 0xffFF5151; } else { this.color = 0xff25ABDE; }
		

		}
		public function colorize():void {
			
			//if (team == 0) { this.color = 0xffFF5151; } else { this.color = 0xff25ABDE; }
			 
		}

		public function setAlpha ():void {
			this.alpha =this.alpha - 0.10;
			
		}
	
	}
	
     

}