pepote
16-04-2006 23:55:22
To turn off or on the ligth with left mouse button don't run.
But If you put the case 16 into MouseRelease this work Ok!!!
I wrote output to console with MousePressed option to turn on or off and I obtain two consecutives changues allways I click left button:
the code
light.SetVisible(!light.IsVisible());
Console.WriteLine("Light state is"+light.IsVisible().toString();
the console output
Light state is false
Light state is true
But If you put the case 16 into MouseRelease this work Ok!!!
I wrote output to console with MousePressed option to turn on or off and I obtain two consecutives changues allways I click left button:
the code
light.SetVisible(!light.IsVisible());
Console.WriteLine("Light state is"+light.IsVisible().toString();
the console output
Light state is false
Light state is true