-
-
Notifications
You must be signed in to change notification settings - Fork 558
Code Snippets
Almas Baimagambetov edited this page Jul 24, 2016
·
15 revisions
This page contains various useful code snippets.
Say you have an A* grid object in your MyApp that you want to access from some AIControl. Have a public accessor to return your grid object in MyApp:
public AStarGrid getGrid() {}
Then, in AIControl, you can obtain the reference to your app and typecast it to your app type:
MyApp app = (MyApp) FXGL.getApp();
app.getGrid() ... // do stuff with the grid
TODO...