[Solved] Detect a color of a sprite

Get all the sprite(10) in a arrayMap. And get the color value or you can say current sprite, Using this key get map value when you are setting the color or sprite. ArrayMap<Sprite, String> arrayMap=new ArrayMap<Sprite, String>(); arrayMap.put(sprite1, “Red”); arrayMap.put(sprite2, “Yellow”); arrayMap.put(sprite3, “Black”); arrayMap.put(sprite4, “Pink”); arrayMap.put(sprite5, “Color1”); arrayMap.put(sprite6, “Color2”); arrayMap.put(sprite7, “Color3”); arrayMap.put(sprite8, “Color4”); arrayMap.put(sprite9, “Color5”); … Read more

[Solved] How to make Main Menu screen show up first (Libgdx)?

Maybe just change file name of GameScreen to MainMenuScreen and set up your menu here ? This is just a question of naming, nothing forbids you to make your MainMenu in GameScreen and nothing forbids you to rename GameScreen class to MainMenuScreen. solved How to make Main Menu screen show up first (Libgdx)?

[Solved] How to implement Admob in my Game in libGDX? [closed]

layout = new RelativeLayout(this); adView = new AdView(this, AdSize.BANNER, adMObid ); View gameView=initializeForView(new TalkingFriendApp(this), cfg); RelativeLayout.LayoutParams adParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); adParams.addRule(RelativeLayout.ALIGN_PARENT_TOP); adParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT); RelativeLayout.LayoutParams adParams1 = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); adParams1.addRule(RelativeLayout.ALIGN_PARENT_TOP); adParams1.addRule(RelativeLayout.ALIGN_PARENT_LEFT); adView.loadAd(new AdRequest()); layout.addView(gameView, adParams); layout.addView(adView, adParams1); setContentView(layout); 12 solved How to implement Admob in my Game in libGDX? [closed]

[Solved] Flying through starfield. LibGDX

While, you still need to think this through, I’ll point you in the right direction, I would recommend you create an object with values such as a vector2 for the spawn point and a vector2 for the direction, as well as an integer for the time counter, I would update these variables in a render … Read more

[Solved] How can I create a SplashScreen in LibGDX that goes through 3 images before showing the main menu? [closed]

Time Delay float delay = 1; // seconds Timer.schedule(new Task(){ @Override public void run() { // Do your work } }, delay); The above code helps you delay the execution, and after that delay you can perform the action you want. Here, Inside the run method you can switch to any screen and ofcourse you … Read more

[Solved] LibGDX: The relationship between Screen interface and Game class

The “core” of LibGDX is always your ApplicationListener class. It contains all the Lifecycle-Hooks the different platforms offer (including create, dispose and so on). The class Game is just one implementation of the ApplicationListener, containing the most usual behavior. For most of the games this class does a great job, if you need some speicial … Read more