mirror of https://github.com/axmolengine/axmol.git
resove conflict
This commit is contained in:
commit
4d71175318
|
@ -263,7 +263,9 @@ Terrain::Terrain()
|
|||
{
|
||||
_alphaMap = nullptr;
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
||||
auto _backToForegroundListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED,
|
||||
_customCommand.setTransparent(false);
|
||||
_customCommand.set3D(true);
|
||||
auto _backToForegroundListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED,
|
||||
[this](EventCustom*)
|
||||
{
|
||||
reload();
|
||||
|
|
|
@ -28,7 +28,7 @@ if(u_has_alpha<=0)
|
|||
texture2D(u_texture1, v_texCoord*u_detailSize[1])*blendFactor.g + texture2D(u_texture2, v_texCoord*u_detailSize[2])*blendFactor.b;\n
|
||||
float grayFactor =dot(blendFactor.rgb, vec3(1, 1, 1));
|
||||
color +=texture2D(u_texture3, v_texCoord*u_detailSize[3])*(1.0-grayFactor);
|
||||
gl_FragColor = color*lightFactor;
|
||||
gl_FragColor = vec4(color.rgb*lightFactor, 1.0);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
@ -34,6 +34,12 @@ TerrainSimple::TerrainSimple()
|
|||
auto listener = EventListenerTouchAllAtOnce::create();
|
||||
listener->onTouchesMoved = CC_CALLBACK_2(TerrainSimple::onTouchesMoved, this);
|
||||
_eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this);
|
||||
// add Particle3D for test blend
|
||||
auto rootps = PUParticleSystem3D::create("Particle3D/scripts/mp_torch.pu");
|
||||
rootps->setCameraMask((unsigned short)CameraFlag::USER1);
|
||||
rootps->startParticleSystem();
|
||||
|
||||
this->addChild(rootps, 0, 0);
|
||||
}
|
||||
|
||||
std::string TerrainSimple::title() const
|
||||
|
@ -107,6 +113,19 @@ TerrainWalkThru::TerrainWalkThru()
|
|||
_player->setCameraMask(2);
|
||||
_player->setScale(0.08);
|
||||
_player->setPositionY(_terrain->getHeight(_player->getPositionX(),_player->getPositionZ())+PLAYER_HEIGHT);
|
||||
|
||||
// add Particle3D for test blend
|
||||
auto rootps = PUParticleSystem3D::create("Particle3D/scripts/mp_torch.pu");
|
||||
rootps->setCameraMask((unsigned short)CameraFlag::USER1);
|
||||
rootps->setScale(30.0f);
|
||||
rootps->startParticleSystem();
|
||||
_player->addChild(rootps);
|
||||
|
||||
// add BillBoard for test blend
|
||||
auto billboard = BillBoard::create("Images/btn-play-normal.png");
|
||||
billboard->setPosition3D(Vec3(0,180,0));
|
||||
billboard->setCameraMask((unsigned short)CameraFlag::USER1);
|
||||
_player->addChild(billboard);
|
||||
|
||||
auto animation = Animation3D::create("Sprite3DTest/girl.c3b","Take 001");
|
||||
if (animation)
|
||||
|
|
Loading…
Reference in New Issue