package com.commons.objects;

import org.anddev.andengine.engine.handler.physics.PhysicsHandler;
import org.anddev.andengine.opengl.texture.region.TiledTextureRegion;

public abstract class game_animated_object extends game_object {
	//****************************************************************
	//** Propiedades estandar de objeto de juego
	//****************************************************************
	
	public int oId;
    public float oRotation_angle=0;
	
	//****************************************************************
	//** Propiedades de Imagen i textura
	//****************************************************************
	
	// Tamaņo de Sprite Map especifico para este objeto
	public int oTilesWith;
	public int oTilesHeight;
	public int oTilesRow;
	public int oTilesColumn;
	public boolean oStartStopped;
	
	public float oScale;
	
	public boolean oThis_object_moving_now=false;
	public boolean oThis_object_animate_now=false;
	
	public int oThis_object_has_special_mov=0;  //0-Simple rotation
	
	public long oAction_start_time;
	public long oDuration_time;
	public int duration_ms=10000;
	
	// Iniciamos el objeto maximizado
	
	// XY maximizado
	public float oBig_pos_X;
	public float oBig_pos_Y;
	
	// XY minimizado
	public float oSmall_pos_X;
	public float oSmall_pos_Y;
	
	// XY Offset from main_part Maximizado
	public float oBig_Offset_posX;
	public float oBig_Offset_posY;
	
	// XY Offset from main_part Minimizado
	public float oSmall_Offset_posX;
	public float oSmall_Offset_posY;
	
	// Moviments specials paramenters
	public float circular_x, circular_y;
	public float parameter_1=0.0f;         //this is the radius
	public float parameter_2=0.0f;
	
	// Object depends of 
    public game_animated_object omaster_obj=null;
    
	// Textura especial que contiene los Tiles para el AnimatedSprite
	public TiledTextureRegion oTiledTextureRegion;
	public PhysicsHandler oPhysicsHandler;
	
	public game_animated_object(float pX, float pY,TiledTextureRegion pTiledTextureRegion) 
	{
		super(pX, pY, pTiledTextureRegion);
		
	   //**************** VELOCITAT INICIAL ***********************
       oPhysicsHandler = new PhysicsHandler(this);
	   this.registerUpdateHandler(oPhysicsHandler);
	   this.oPhysicsHandler.setVelocity(0, 0);
	}
	
	public void fadeIn() {
	}
	public void fadeOut() {
	}
	
}

