Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by streamer

Hi,
i have for example: 15 images of asteroids .... they have image located in media/asteroid.png

I need thoroud the javascript simply change some these entities image to facebook profile pic... but there is a problem for me where in the object I need to rewrite link to picture because there is a lot of media/asteroid.png link to this pic... i tried to do this with something like this:

 ig.game.getEntitiesByType(EntityAsteroid)[0].animSheet.image.data.path = 'https://graph.facebook.com/peter.oravec/picture';

but it does not functional
can you help me with this?

what can i write to console if I want to change the pic of current entity without the framework?

Thanks and Happy New Year :-D

1 decade ago by Arantor

You have to have loaded the image as an instance of ig.Image rather than just changing the path.

But it would probably help to understand the overall thing you're trying to do rather than a specific tiny part of it...

1 decade ago by Arantor

Bah, can't edit on an iPad, but you not only need to handle it as an ig.Image but also as an instance of ig.animSheet.
Page 1 of 1
« first « previous next › last »