Exemplo n.º 1
0
void draw(unsigned int deltaT)
{
	Pattern *pattern = &sparks;

	pattern->reset();
	pattern->update(deltaT);
	pattern->draw();
}
BlockList::Block *Track_Pattern::create_duplicate_block(Block *p_block) {

	PatternBlock *b = dynamic_cast<PatternBlock*>( p_block );
	ERR_FAIL_COND_V( b==NULL , NULL );

	//new pattern
	Pattern *np = new Pattern;
	*np=*b->get_pattern(); //copy
	np->reset();

	//new block
	PatternBlock *nb = new PatternBlock(np);

	return nb;


}