aboutsummaryrefslogtreecommitdiff
path: root/examples/particle_system
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-12-06 13:12:29 +0800
committerchai <chaifix@163.com>2018-12-06 13:12:29 +0800
commitb3712ebdf148bd8d2d31e70734a4b7923f6038f8 (patch)
treec813d158030ee33b76d7ec23fa2deaa1eb0a4e36 /examples/particle_system
parent17d86218e25a6c889c24822da8d7b59967babd89 (diff)
*remove create function
Diffstat (limited to 'examples/particle_system')
-rw-r--r--examples/particle_system/main.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/particle_system/main.cpp b/examples/particle_system/main.cpp
index 6b7de94..ba2f496 100644
--- a/examples/particle_system/main.cpp
+++ b/examples/particle_system/main.cpp
@@ -46,17 +46,16 @@ void onLoad()
for (int i = 0; i < 10; ++i)
{
string name = string("dust/s_dust_A_") + std::to_string(i) + ".png";
- textures[i] = Texture::createTexture(name.c_str());
+ textures[i] = new Texture(name.c_str());
sprites[i] = new Sprite(textures[i], Origin::MIDDLECENTER);
}
-
- tex = Texture::createTexture("particle.png");
+ tex = new Texture("particle.png");
spr = new Sprite(tex, Origin::MIDDLECENTER);
- tex1 = Texture::createTexture("texture.png");
+ tex1 = new Texture("texture.png");
spr1 = new Sprite(tex1, Origin::MIDDLECENTER);
- tex2 = Texture::createTexture("splash.png");
+ tex2 = new Texture("splash.png");
spr2 = new Sprite(tex2, Origin::MIDDLECENTER);
- shader = Shader::createShader(shader_code);
+ shader = new Shader(shader_code);
/*
ParticleSystemDef def;
def.maxParticleCount = 30;