我需要帮助打电话给不同的班级 我想创建一个课程,菜单,游戏,选项菜单,学分等 我只需要知道如何调用另一个类
//好的,我已经编辑了我的帖子,希望我提供了足够的信息。
游戏类
//Add Screens
private MenuScreen menuScreen;
public final static int MENU=0;
public void changeScreens(int screen){
switch(screen){
case MENU:
if(menuScreen==null){
menuScreen=new MenuScreen(this);
}
}
}
//Render (When you click on the button)
if(drawplay) {
menuScreen=new MenuScreen(this);
setScreen( menuScreen);
//MenuScreen Class
ublic class MenuScreen implements Screen {
private rugby parent;
public MenuScreen(rugby rugby){
parent = rugby;
}
@Override
public void render(float delta) {
Gdx.app.log( "Play","Play" );
}