Gio,
I wanted to code up something like the attached image.
In a previous discussion thread (shadow light effect), you helped me figure out how to make a whole layer/game fade from day to night.
Now, I want the whole game faded out, except where the flashlight is shining.
The light would be attached to a sceneObject which could move (ex the player).
I'm thinking something like this.
Create a layer 'Darkenss Layer' which lays over everything but the gui.
Create a transparent or whitish triangular shaped sprite name flashlight.png
sp = new Sprite('flashlight.png', Darkness Layer);offset = {x:0,y:-50}player.addSprite(sp,offset);
Will this work, or will it just look like a white triangle over the darkness layer ?
I figured I ask you before I tried coding something up in case I'm just in the dark here.
cheers,
Shri