Exemplo n.º 1
0
Panda *Panda::create()
{
    auto panda = new Panda();
    if(panda&&panda->initWithSpriteFrameName("taopaoxiongmao00000.png"))
    {
        panda->autorelease();
        panda->setAnchorPoint(Point::ANCHOR_MIDDLE_BOTTOM);
        panda->initAnimations();
        panda->runAction(RepeatForever::create(Animate::create(AnimationCache::getInstance()->getAnimation("taopaoxiongmao"))));
        panda->setDisplayFrameWithAnimationName("taopaoxiongmao", 1);
        return panda;
    }
    CC_SAFE_FREE(panda);
    return nullptr;
}
Exemplo n.º 2
0
bool ItemDarkCloud::init(CCDictionary* dict)
{
	Item::init();
	_type = Item::IT_mushroom;

	setPositionByProperty(dict);



	// ͼƬ
	setDisplayFrameWithAnimationName("MushroomMoving", 0);


	return true;
}