Hey All,
Just set up the account to explore PlayCanvas option. Trying to work out some of the basics and I am struggling with how to get classes to talk to each other. Below is s very simple example of what I am trying to do
I’ve created a Game.js script and attached it to the Root. I’m trying to call a function in the scriptB.js file.
Game.js file
Game.prototype.initialize = function() {
ScriptB.alertMe();
}
scriptB.js
ScriptB.prototype.alertMe = function() {
alert("Found the Script");
}
My questions are. where do I attach ScriptB to get it to be included in the game package?
What steps do I take in Game.js so I can call the function in, ScriptB.js?
I’m sure this has been asked and answered many time, and I have looked, but I can’t find anything that is working or I understand.
Thanks,
Ross
.