package config {
	import flash.display.*;
	import flash.geom.*;
  import flash.events.*;
  import flash.net.*;
	
	public class entclass  {
		public function entclass() {
			clear();
		}
		
		public function clear():void {
			//Set all values to a default, required for creating a new entity
			active = false; invis = false;
			type = "null";  tile = 0; rule = "null";
			name = "null"; stringpara = "null";
			state = 0; statedelay = 0; life = 0; colour = 0; para = 0;
			behave = 0; animate = 0;
			
			xp = 0; yp = 0; ax = 0; ay = 0; vx = 0; vy = 0;
			w = def.SPRITESIZE; h = def.SPRITESIZE; cx = 0; cy = 0;
			newxp = 0; newyp = 0;
			
			transx = 0; transy = 0;	rot = 0;
			
			x1 = 0; y1 = 0; x2 = def.SCREENWIDTH; y2 = def.SCREENHEIGHT;
			
			jumping = false; gravity = false; onground = 0; onroof = 0; jumpframe = 0;
			
	    onentity = 0; onwall = 0; onxwall = 0; onywall = 0;
			
			framedelay = 0; drawframe = 0; walkingframe = 0; dir = 0; actionframe = 0;
			
			doscriptmove = false;
			scriptmovedestx = 0; scriptmovedesty = 0;
		}
		
		public var scriptmovedestx:int, scriptmovedesty:int;
		public var doscriptmove:Boolean;
		
    //Fundamentals
		public var active:Boolean, invis:Boolean;
		public var type:String, tile:int, rule:String;
		public var state:int, statedelay:int;
		public var behave:int, animate:int, para:int;
		public var life:int, colour:int;
		public var name:String, stringpara:String;
		//Position and velocity
		public var xp:Number, yp:Number, oldxp:Number, oldyp:Number;
		public var ax:Number, ay:Number, vx:Number, vy:Number;
		public var cx:int, cy:int, w:int, h:int;
    public var newxp:Number, newyp:Number; //For collision functions
		public var x1:int, y1:int, x2:int, y2:int;
		public var rot:Number, transx:int, transy:int;
		//Collision Rules
		public var onentity:int, onwall:int, onxwall:int, onywall:int;
		
		//Platforming specific
		public var jumping:Boolean, gravity:Boolean, onground:int, onroof:int;
		public var jumpframe:int;
		//Animation
		public var framedelay:int, drawframe:int, walkingframe:int, dir:int, actionframe:int;
	}
}
