Report as inappropriate.
You can move the blue Point with arrow keys.
If you want, you can copy this scenario to use it for your own scenarios.
How to use this:
First copy the complete Darkness-class in your own scenario.
If you want an object, to has a light, it has to implement the class 'Glower'. (Therefore, you can take a look at the Bulb-class)
If an Actor implements the Glower-class, it has to overwrite the 'getGlowImage()'-Method. (this method returns an image of the structure, the light should have. If it returns 'null', there will be no light)
And last two steps:
Add a Darkness-object to the world. This you can easily do by 'addObject(new Darkness(),0,0)' (if you want the light to fade slowly, just add a number in the brackets after 'new Darkness'. The number should be a 'double'-value between 0 and 3. (It will be set automatically in this range))
And the last step:
Set the paint-order by: 'setPaintOrder(Darkness.class,Actor.class);' (in the World-subclass)
5571 views / 19 in the last 7 days
6 votes | 0 in the last 7 days
This scenario is a member of: Reusable actors & support classes