reset sprite3dtest

This commit is contained in:
yangxiao 2014-08-18 18:01:57 +08:00
parent b9c28dd8d7
commit 3fd122391c
1 changed files with 27 additions and 28 deletions

View File

@ -46,7 +46,6 @@ static int sceneIdx = -1;
static std::function<Layer*()> createFunctions[] = static std::function<Layer*()> createFunctions[] =
{ {
CL(Sprite3DMirrorTest),
CL(Sprite3DBasicTest), CL(Sprite3DBasicTest),
CL(Sprite3DHitTest), CL(Sprite3DHitTest),
#if (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) && (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) #if (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) && (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT)
@ -1272,17 +1271,17 @@ std::string Sprite3DMirrorTest::subtitle() const
void Sprite3DMirrorTest::addNewSpriteWithCoords(Vec2 p) void Sprite3DMirrorTest::addNewSpriteWithCoords(Vec2 p)
{ {
std::string fileName = "Sprite3DTest/orc.c3t"; std::string fileName = "Sprite3DTest/orc.c3b";
auto sprite = Sprite3D::create(fileName); auto sprite = Sprite3D::create(fileName);
sprite->setScale(6); sprite->setScale(5);
sprite->setRotation3D(Vec3(0,180,0)); sprite->setRotation3D(Vec3(0,180,0));
addChild(sprite); addChild(sprite);
sprite->setPosition( Vec2( p.x - 80, p.y) ); sprite->setPosition( Vec2( p.x - 80, p.y) );
// //test attach //test attach
// auto sp = Sprite3D::create("Sprite3DTest/axe.c3b"); auto sp = Sprite3D::create("Sprite3DTest/axe.c3b");
// sprite->getAttachNode("Bip001 R Hand")->addChild(sp); sprite->getAttachNode("Bip001 R Hand")->addChild(sp);
//
auto animation = Animation3D::create(fileName); auto animation = Animation3D::create(fileName);
if (animation) if (animation)
{ {
@ -1293,25 +1292,25 @@ void Sprite3DMirrorTest::addNewSpriteWithCoords(Vec2 p)
_sprite = sprite; _sprite = sprite;
_hasWeapon = true; _hasWeapon = true;
// //create mirror Sprite3D //create mirror Sprite3D
// sprite = Sprite3D::create(fileName); sprite = Sprite3D::create(fileName);
// sprite->setScale(5); sprite->setScale(5);
// sprite->setScaleX(-5); sprite->setScaleX(-5);
// sprite->setCullFace(GL_FRONT); sprite->setCullFace(GL_FRONT);
// sprite->setRotation3D(Vec3(0,180,0)); sprite->setRotation3D(Vec3(0,180,0));
// addChild(sprite); addChild(sprite);
// sprite->setPosition( Vec2( p.x + 80, p.y) ); sprite->setPosition( Vec2( p.x + 80, p.y) );
//
// //test attach //test attach
// sp = Sprite3D::create("Sprite3DTest/axe.c3b"); sp = Sprite3D::create("Sprite3DTest/axe.c3b");
// sprite->getAttachNode("Bip001 R Hand")->addChild(sp); sprite->getAttachNode("Bip001 R Hand")->addChild(sp);
//
// animation = Animation3D::create(fileName); animation = Animation3D::create(fileName);
// if (animation) if (animation)
// { {
// auto animate = Animate3D::create(animation); auto animate = Animate3D::create(animation);
//
// sprite->runAction(RepeatForever::create(animate)); sprite->runAction(RepeatForever::create(animate));
// } }
// _mirrorSprite = sprite; _mirrorSprite = sprite;
} }