Package vooga.engine.overlay

Overlay Our “Overlay” API allows developers to quickly and easily display stats and/or labels from their game on the screen in Greenfoot.

See:
          Description

Class Summary
Overlay Generic Overlay class to be extended by any Overlay class that uses a Stat object to keep track of it's current value.
OverlayBar The OverlayBar class displays a bar that grows or shrinks based on a Stat and a maximum indicated by the user.
OverlayCreator This class is used for creating overlays from an xml file instead of in the code itself.
OverlayExample This example shows how to create two different groups of Overlays from an XML file and display them on screen.
OverlayIcon This Overlay class displays a finite number of icons, with an image provided by the user.
OverlayLabel Takes an OverlayString and places it over the top of another Sprite.
OverlayPanel The OverlayPanel provides a convenient way for users to evenly place overlays across the top or bottom of the screen.
OverlayStat The Overlay stat class to display a String and something the user defines For an example see OverlayExample.java.
OverlayStatImage The OverlayStatImage class displays a image.
OverlayString This OverlayString class displays some text on the screen.
OverlayTracker Class used to track overlays and Stats.
Stat<T> Generic Stat class, can be of any non primitive type.
 

Package vooga.engine.overlay Description

Overlay Our “Overlay” API allows developers to quickly and easily display stats and/or labels from their game on the screen in Greenfoot. Developers can use one of the several Overlay classes we have developed to accomplish this. Simply instantiate an instance of the overlay class that interests you, pass it the necessary parameters, and never worry about it again. The key parameter you must pass to the Overlay when you construct it is an object that implements one of our StatKeeper interfaces. That object contains a method which should return the score or other of your game at the time it is called. For example, if you want to display how many bullets a user has remaining the method should always return the number of bullets remaining. Each of our overlay classesdisplay your statistic in a different manner. For example, OverlayBar displays a gauge that increases and decreases according to the current value it’s keeping track of. In addition, you can set a variety of style parameters that change the color of the text displayed, the font, and many other properties. If you would like to display more than one piece of data on the screen at a time simply instantiate any overlay class. If you are creating multiple overlays we provide an OverlayManager for your convenience. Our OverlayManager allows you to do things like position your overlays relative to one another and remove all the overlays at once.