Returns null if no node is found with that name. Given the string name of an Animation node, this method returns the matching Animation node object. Putting complex logic in this function can negatively affect performance. Returns the Ui object connected to this 3D world on the mind map.Īn entity’s update() function is called every frame. To add custom behavior when a player touches the screen, you’ll need to add this function to your script, like in the example below. Triggered when the player moves their finger. Triggered when the player lifts their finger. To add custom behavior when a player touches the screen, you’ll need to add this function to your script, as in the example below. Triggered when the player touches the screen. Start() is called after all inits on other objects are called. The Scene object handles things at the 2D/3D world level.Īn entity’s signal() function is called upon receiving a signal from an input connection. If you connect the purple circle of one script node to an input connection on another script node, the data from the requested() function of the first script node will be sent to the second one whenever the second one calls this.attribute(name). While emitSignal() sends out data, attribute(name) can be used to request data. This function is tied to the purple circle on the right side of some nodes. Works the same as console.log() in a normal JavaScript context. You can use this to debug your code by logging variables. Outputs a message to the console (displayed on the right side of the Preview window). Init() is called when the entity is initialized. Returns the Entity object of this script node. The entity will start receiving events for three functions: touchBegan(point), touchMove(point), and touchEnd(). Output connections are added to a script node by clicking the “+” button on the right side of the node.Įnables touch events. Returns the data type of the given attribute.ĭisables touch events. Returns an array of the names of all the attributes within the script node. Attributes can be various data types such as number, Vector3D, boolean, etc., so this method will return the data in that format. Returns the value of an attribute of this script node. Script Nodes (also called Script Components) consist of four functions by default: init(), start(), update(dt), signal(name, value, sender, source), and requested(name, arg, sender). This API will help you control many aspects of your game with BuildBox-specific functionality. Most standard JavaScript will work within BuildBox. However, it’s also possible to add code to your game by using JavaScript. With BuildBox you can make games without any coding expertise.
0 Comments
Leave a Reply. |