void GameplayLayer::migrateDicesAndShow() { for (auto dice : Game::getInstance()->getActionDices()) { auto sprite = (ActionDiceSprite*) dice->getSprite(); CC_SAFE_RETAIN(sprite); auto position = sprite->getParent()->getPosition(); sprite->removeFromParent(); auto newPosition = sprite->getPosition() + position; sprite->setPosition(newPosition); sprite->setOriginalPosition(newPosition); this->addChild(sprite); CC_SAFE_RELEASE(sprite); } this->runAction(Show::create()); }
Goal::Goal(void) : GameObject() { setCollider(-25, -10, -25, 10, 25, 10, 25, -10); setOriginalPosition(-25, -10, -25, 10, 25, 10, 25, -10); }