How to access the object via id?

26 views
Skip to first unread message

Михаил Суходаев

unread,
Jan 28, 2019, 10:30:39 AM1/28/19
to Crafty
How to access the object via id?
For instance
var player = Crafty.e("2D, DOM, Mouse, Color").attr({w:50, h:50}).color("#00FF00");
var ent_id = player.getId();
console.log(ent_id);

We got id.
But now we want to refer to the object and, for example, move it along the x axis
ent_id.????


Reply all
Reply to author
Forward
0 new messages