I'm not sure what you are trying to do with that code, but I don't think a typecast is the right course of action.
I'm not sure what you are trying to do with that code, but I don't think a typecast is the right course of action.
Sorry, I should probably have added:
hence the typecast since player.Control[] returns a Control (an interface AnimControl implements). I still get the error without the typecast so it has nothing to do with it.Code:var control: AnimControl;
For now I've managed to work around the issue since there's an overloaded version of player.Control where I can pass an integer. I simply traverse through all the controllers in player and check if the current controller is of the type I want.
Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits
@pstudio: I know this is off-topic, but I have had no luck so far getting an external java library to both compile + run successfully without compiler errors or just runtime crashes...
I have tried slick, lwjgl and jMonkey.
I don't suppose you could share a working bare bones minimum jmonkey project that compiles and works under Oxygene so I can see what I might be missing?
I have wasted a day on this and I am rapidly running out of time with the competition if I want to use Oxygene
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
JMonkeyTemplate.zip
This is a simple project but without the needed jar files (I haven't bothered sorting out the stuff I don't need so the jars are 65 mb right now)
You will need to download the jars from http://jmonkeyengine.com/nightly/ (I've used jME3_2012-03-30) and resolve the references yourself.
The jars provided with the JMonkey SDK did not work for me. Add them as reference and make sure they're set to be copied to the output folder. This was the only way I could make the compiled jar work.
Note that I haven't been able to debug from Visual. The program will start and show you a menu for selecting resolution but when you press play VS will crash. However the compiled jar works fine.
Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits
Thanks so much mate!
I guess I could add the jars as a reference and copy local
cheers,
Paul
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
Well I got my version working ok after using your template and the nightly build...thanks again!
On the other hand, I just want to do a 2d game made mainly of tiles with a small amount of special moving objects....not sure if I can do this easily with JMonkey though
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
nah, I would use slick for 2d. possibly combine it with Artemis. But I haven't tried it with oxygene myself.
Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits
Bookmarks