void Renderer::GenerateParticleEffect( std::shared_ptr< Tile > tile ) { Rect r( 0,0,10,10 ); Vector2f pos = RectHelpers::CenterInRect( tile->rect, r ); SDL_Color color = GetTileColor( tile ); //for ( int i = 0; i < colorConfig.particleFireCount ; ++i ) for ( int i = 0; i < 1 ; ++i ) { auto p = Particle( Rect( pos.x, pos.y, 10, 10 ), color ); p.SetDecay( colorConfig.particleDecayMin, colorConfig.particleDecayMax ); p.SetSpeed( colorConfig.particleSpeedMin, colorConfig.particleSpeedMax ); particles.push_back( p ); } }
//----------------------------------------------------------- // //----------------------------------------------------------- SynthEG::SynthEG(Real _a, Real _d, Real _s, Real _r) : m_phase(), m_state(EGState::OFF), m_attack(), m_decay(), m_sustain(), m_release(), m_delta_phase_decay(), m_delta_phase_release(), m_release_level(), m_attack_rate(), m_last_val() { SetAttack(_a); SetDecay(_d); SetSustain(_s); SetRelease(_r); }