static var isNormal : boolean = false; // es normal cuando no esta saltando ni agachado.
static var isShooting : boolean = false; // Esta disparando.
static var isReloading : boolean = false; // Esta recargando el arma-
static var isRunning : boolean = false;
static var IsJumping : boolean = false;
static var isCrouched : boolean = false;
static var IsAiming : boolean = false;

static var isNormalAntFrame : boolean = false;
static var isShootingAntFrame : boolean = false;
static var isRunningAntFrame : boolean = false;
static var IsJumpingAntFrame : boolean = false;
static var isCrouchedAntFrame : boolean = false;
static var IsAimingAntFrame : boolean = false;

static var IsFire1Down : boolean = false;
static var IsFire1Pressed : boolean= false;
static var IsFire1Up : boolean= false;

static var IsFire2Down : boolean = false;
static var IsFire2Pressed : boolean= false;
static var IsFire2Up : boolean= false;

static var IsAxisXActive : boolean= false;
static var AxisXValue : float = 0;

static var IsAxisYActive : boolean= false;
static var AxisYValue : float = 0;

private var walker : CharacterMotor;

function Start () {
	walker = GetComponent(CharacterMotor);
}

function Update () {
	// Comprobar los valores para igualar el frame anterior al principio de este nuevo frame.
	isNormalAntFrame = isNormal;
	isShootingAntFrame = isShooting;
	/*isRunningAntFrame = isRunning;
	IsJumpingAntFrame = IsJumping;*/
	isCrouchedAntFrame = isCrouched;
	IsAimingAntFrame = IsAiming;
	
	isNormal = false;
	if(!IsJumping && !isRunning)
		isNormal = true;
		
	if(!walker.grounded && walker.jumping && !IsAiming)
		IsJumping = true;
	else
		IsJumping = false;
		
		
	if(Input.GetButtonDown("Fire1")) {
		IsFire1Down = true;
		IsFire1Pressed = true;
		IsFire1Up = false;
	}
	else
	if(Input.GetButton("Fire1")) {
		IsFire1Down = false;
		IsFire1Pressed = true;
		IsFire1Up = false;
	}
	else
	if(Input.GetButtonUp("Fire1")) {
		IsFire1Down = false;
		IsFire1Pressed = false;
		IsFire1Up = true;
	}
	else{
		IsFire1Down = false;
		IsFire1Pressed = false;
		IsFire1Up = false;
	}
	
	
	if(Input.GetButtonDown("Fire2")) {
		IsFire2Down = true;
		IsFire2Pressed = true;
		IsFire2Up = false;
	}
	else
	if(Input.GetButton("Fire2")) {
		IsFire2Down = false;
		IsFire2Pressed = true;
		IsFire2Up = false;
	}
	else
	if(Input.GetButtonUp("Fire2")) {
		IsFire2Down = false;
		IsFire2Pressed = false;
		IsFire2Up = true;
	}
	else{
		IsFire2Down = false;
		IsFire2Pressed = false;
		IsFire2Up = false;
	}
	
	AxisXValue = Input.GetAxis("Mouse X");
	AxisYValue = Input.GetAxis("Mouse Y");
	if(AxisXValue == 0)
		IsAxisXActive = false;
	else
		IsAxisXActive = true;
	
	if(AxisYValue == 0)
		IsAxisYActive = false;
	else
		IsAxisYActive = true;
}