Ejemplo n.º 1
0
ItemSlowmo::ItemSlowmo( StateLevel *newParent ) : UnitBase( newParent, &shape )
{
	if ( !idle )
		generateIdleImage();
	activeSprite = idle;

	shape.radius = ITEM_SLOWMO_RADIUS;
	x = &( shape.pos.x );
	y = &( shape.pos.y );

	life.start( ITEM_SLOWMO_LIFE );
	timers.push_back( &life );
}
Ejemplo n.º 2
0
ItemVortex::ItemVortex( StateLevel *newParent ) : UnitBase( newParent, &shape )
{
	if ( !idle )
		generateIdleImage();
	activeSprite = idle;

	shape.radius = ITEM_VORTEX_RADIUS;
	x = &( shape.pos.x );
	y = &( shape.pos.y );

	flags.add( ufSolid );
	life.start( ITEM_VORTEX_LIFE );
	timers.push_back( &vortex );
	timers.push_back( &life );

	type = utItemVortex;
}
Ejemplo n.º 3
0
UnitLaser::UnitLaser( StateLevel *newParent ) : UnitBase( newParent, &shape )
{
	if ( !idle )
		generateIdleImage();
	activeSprite = idle;

	angle = 0;
	angleVel = 0;
	shape.radius = LASER_RADIUS;
	projectile = NULL;
	hasCharged = false;
	type = utLaser;
	life.start( LASER_TIME_MOVEMENT );
	maxVel = LASER_MAX_MOVEMENT_SPEED;
	maxAccel = LASER_MOVEMENT_ACCEL;
	friction = LASER_MOVEMENT_FRICTION;
	timers.push_back( &charge );
	timers.push_back( &life );
}
Ejemplo n.º 4
0
UnitBomb::UnitBomb( StateLevel *newParent ) : UnitBase( newParent, &shape )
{
    if ( !idle )
        generateIdleImage();
    if ( !flashing )
        generateFlashingImage();
    activeSprite = idle;

    shape.radius = BOMB_RADIUS;

    pressure = 0;
    status = 0;
    maxVel = BOMB_IDLE_MAX_VEL;
    maxAccel = BOMB_IDLE_MAX_ACCEL;
    friction = BOMB_IDLE_FRICTION;
    isFlashing = false;
    type = utBomb;
    timers.push_back( &bombTimer );
    timers.push_back( &flashTimer );
    timers.push_back( &evadeTimer );
}