LibGdx -simple game with different type of drops

by Niranjana   Last Updated December 07, 2017 09:13 AM

Hope everyone knows the basic Libgdx game in this link:

In the simple game,rain drops are falling randomly from the top,that is of one type. In my case,I want to implement the same thing,as drops.The difference is that,there are four type of drops.When it collides with another object,four should show four different characteristics.

In short,I created a Drop class with its object and array and can spawn drop objects too.

   Drop drop=new Drop();
   private Array<Drop> drops=new Array<Drop>();

But what if I want to define individual attributes for drops in this case? I want the drop object to be categorized of four types. For example have different colors yellow,red,green and blue.Also four kind of drops should fall randomly from top.

In which way,and how I should implement such a concept?

It would be very helpful if I get some idea on this.

Tags : libgdx

Related Questions

Libgdx with Scala: Overwrite listener

Updated April 05, 2015 00:05 AM

Set the camera to follow a TextureRegion

Updated June 14, 2015 02:05 AM

How to use world coordinates

Updated June 23, 2015 02:05 AM

Does the LibGDX AI extension work on IOS?

Updated July 03, 2015 13:05 PM