- Points
- 131
- Digest
- 0
- R.P.
- 20
- Joined
- 2011-9-4
- Last visit
- 2011-11-24
- Posts
- 33

|
lets say i have- class enemy
- {
- var sprite;
- }
- ......
- var enm = new enemy();
- enm.sprite=scene.addsprite("angrylargewtf.png").pos(100,10);
- var enm2 = enm.copy();
- enm2.sprite.addaction(imoveby(100,100));
- .....
Copy // and thats not actual code, this is a "for instance" so there might be typos.
does the sprite copy and make a duplicate sprite for the second enemy or will both enemies be pointing at the same sprite?
|
|