From 7e0c16c53d2b57ba3bd44b8c548b1d366bb40511 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Thu, 3 May 2012 16:07:29 -0700 Subject: [PATCH] particle test: uses texturecache --- testjs/JS/1to1/test_particles.js | 2 +- .../cocos2dx/particle_nodes/CCParticleSystem.cpp | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/testjs/JS/1to1/test_particles.js b/testjs/JS/1to1/test_particles.js index 96fd81b490..b7e08e4e0e 100644 --- a/testjs/JS/1to1/test_particles.js +++ b/testjs/JS/1to1/test_particles.js @@ -47,7 +47,7 @@ scenes['test_manual'] = function () { scene.addChild(p1); -// p1.texture = cocos.TextureCache.sharedTextureCache.addImage( "stars2.png" ); + p1.texture = cocos.TextureCache.sharedTextureCache().addImage( "stars2.png" ); p1.duration = 3; diff --git a/testjs/libs/cocos2dx/particle_nodes/CCParticleSystem.cpp b/testjs/libs/cocos2dx/particle_nodes/CCParticleSystem.cpp index 19550e4f01..0e8ac6b19d 100644 --- a/testjs/libs/cocos2dx/particle_nodes/CCParticleSystem.cpp +++ b/testjs/libs/cocos2dx/particle_nodes/CCParticleSystem.cpp @@ -342,20 +342,6 @@ bool CCParticleSystem::initWithTotalParticles(unsigned int numberOfParticles) return false; } - m_pTexture = CCTextureCache::sharedTextureCache()->addImage( "stars2.png" ); - m_pTexture->retain(); - - m_tStartColor.r = 0.5; - m_tStartColor.g = 0.5; - m_tStartColor.b = 0.5; - m_tStartColor.a = 0.5; - - m_tEndColor.r = 1.0; - m_tEndColor.g = 0.0; - m_tEndColor.b = 0.0; - m_tEndColor.a = 1.0; - - // default, active m_bIsActive = true;