This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes Game Development and the fly likes Help with class for a script object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "Help with class for a script object" Watch "Help with class for a script object" New topic
Author

Help with class for a script object

Vinicius Souza
Ranch Hand

Joined: May 18, 2011
Posts: 58

Hi! I will try to explain my problem. Im creating a scripting class that expose some functionality of my game to be used on the JavaScript. So I created the following class:

So, in somewhere of my game engine Im creating a instance of this class and adding this instance to the script engine:

When Im on the script I can use this script (its works):

As you can see, the Script Engine cant access a public method called in(), but can access the method showMessage() which is declared on the same class...
I really dont know why its not working....
Help will be very appreciated! Im really stucked on this...
thanks!


Java is the best (I love C too) heehhh
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: Help with class for a script object