Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17084

How to clone a sprite?

$
0
0

@agriz wrote:

Sir,

for(var i = 0; i < 4; i += 1) {
 	sprite = new cc.Sprite("sameimage.png"); 
        this.addChild(draggable);
}

So, I create the same image for 4 times.
And i need to create those four images again with different name.

Is it good idea creating them multiple times?
Is there any other improved way? So it wont be recreated every time?

Thanks

Posts: 6

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 17084

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>