Ejemplo n.º 1
0
	// Gets position of spinning particle effect
	Vec2 GetSpinningEffectPosition() const
	{
		const Vec2 screenCenter( (float) App::GetWidth() * 0.5f, (float) App::GetHeight() * 0.5f );
		Vec2 spinningEffectPosition = screenCenter * 1.3f;
		spinningEffectPosition.Rotate(spinningEffectRotation, screenCenter);
		return spinningEffectPosition;
	}
Ejemplo n.º 2
0
void Wall::OnDestroy( bool bomb )
{
    if ( bomb )
        return;
    Vec2 d = _dir;
    d.Rotate( M_PI / M_TWO );
    Vec2 v = GetPosition() + d * M_TEN * 3;
    if ( v._x >= 0 && v._x <= Lib::WIDTH && v._y >= 0 && v._y <= Lib::HEIGHT )
        Spawn( new Square( v, GetRotation() ) );
    v = GetPosition() - d * M_TEN * 3;
    if ( v._x >= 0 && v._x <= Lib::WIDTH && v._y >= 0 && v._y <= Lib::HEIGHT )
        Spawn( new Square( v, GetRotation() ) );
}