Skip to content

Commit

Permalink
Added setName
Browse files Browse the repository at this point in the history
  • Loading branch information
gogoprog committed Jan 26, 2017
1 parent 5824e57 commit cc01582
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/haxe/gengine/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class Main
engine.entityAdded.add(onEntityAdded);
engine.entityRemoved.add(onEntityRemoved);

untyped __js__("window.dummyNode = gengine.getScene().createChild(0, 0, false);");
untyped __js__("window.dummyNode = gengine.getScene().createChild(0, 0, false)");
untyped __js__("window.dummyNode.setName('dummyNode')");
untyped __js__("window.dummyNode.setEnabled(false)");

engine.addSystem(new Physics2DSystem(), 1);
Expand Down
2 changes: 2 additions & 0 deletions src/script/script_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

using namespace Urho3D;

EMBINDCEFV8_DECLARE_STRING(String, CString);
EMBINDCEFV8_DECLARE_ENUM(CreateMode);
EMBINDCEFV8_DECLARE_ENUM(TransformSpace);
EMBINDCEFV8_DECLARE_CLASS(Scene);
Expand All @@ -22,6 +23,7 @@ EMBINDCEFV8_BINDINGS(scene)

embindcefv8::Class<Node>("Node")
.constructor<Context*>()
.method("setName", &Node::SetName)
.method("setPosition", &Node::SetPosition)
.method("setWorldPosition", &Node::SetWorldPosition)
.method("setRotation", &Node::SetRotation)
Expand Down

0 comments on commit cc01582

Please sign in to comment.