A new version of this scenario was uploaded on Wed Dec 26 19:21:04 UTC 2012
An actor class that creates a beam of light within darkness. Follows a light source object. Minor improvements.
A new version of this scenario was uploaded on Wed Dec 26 19:46:54 UTC 2012
An actor class that creates a beam of light within darkness. Follows a light source object. Minor adjustments.
Hello Danspot
Can I ask you if you have any demo about Mario game?
thx
A new version of this scenario was uploaded on Sun Dec 30 09:19:10 UTC 2012
Support class giving an actor the ability to emit light. Methods provided to alter beam/darkness.
Well, to be thinner, you change the range (look at the Beam documentation) And you'll probably have to edit the beam class to make a greenish hue, change the updateImage code to this:
[code]
// add ambiance to image
image.setColor(new Color(/* The RGB values*/, 255-intensity));
image.fill();[/code]
@Laurence, if the actor points in the direction of the cursor, then the beam will also. The beam will always follow the "source" actor and point in the same direction that actor faces.
public class Lamp extends Actor
{
int dir = 0;
/**
* Act - do whatever the Lamp wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
setRotation(90);
}
}
I've made a simple 'lamp' image and indeed it turns 90 degrees but the beam stares straight forward weirdly enough.
2012/12/26
2012/12/26
2013/4/24
2013/4/24
2013/4/24
2013/4/24
2013/4/24
2013/4/24
2013/4/24
2013/4/24
2013/4/24
2016/9/5
2016/9/5
2016/9/5
2016/9/5
2016/9/5