1

私は iPhone の開発に不慣れで、この特定の効果の実例を見たいと思っています。前もって感謝します。

粒子爆発

4

3 に答える 3

2
    CCParticleSystem *emitter = [CCParticleExplosion node];

    //set the location of the emitter
    emitter.position = mySprite.position;

    //set size of particle animation
    emitter.scale = 0.5;

    //set an Image for the particle
    emitter.texture = [[CCTextureCache sharedTextureCache] addImage:@"particle.png"];

    //set length of particle animation
    [emitter setLife:0.5f];

    //add to layer ofcourse(effect begins after this step)
    [self addChild: emitter];
于 2012-08-18T18:38:59.083 に答える
0

次のように簡単です。

ParticleSystem *emitter = [ParticleExplosion ノード]; [self addChild: エミッター];

于 2009-03-20T07:35:38.807 に答える