TETRIS: make copySelf actually copy everything
This commit is contained in:
parent
20c30712b9
commit
d4f3e07ae4
@ -33,7 +33,12 @@ public:
|
||||
pieces_bag[_index]++;
|
||||
}
|
||||
virtual std::shared_ptr< RenderObject > copySelf() override {
|
||||
return std::make_shared< TetrisBlock >( *this );
|
||||
auto ret = std::make_shared< TetrisBlock >( *this );
|
||||
copyTo(ret);
|
||||
return ret;
|
||||
}
|
||||
virtual void copyTo(std::shared_ptr<RenderObject> other) override {
|
||||
RectangleRender::copyTo(other);
|
||||
}
|
||||
std::shared_ptr< TetrisBlock > copyInScene() {
|
||||
auto ret = std::shared_ptr< TetrisBlock >( new TetrisBlock( *this ) );
|
||||
|
Loading…
Reference in New Issue
Block a user