Here is a snippet of the code:
public static void Update ()
{
// Query gamepad for current state
var gamePadData = GamePad.GetData (0);
if (gamePadData.Buttons != 0)
buttonsPressed = true;
else
buttonsPressed = false;
}
public static void Render ()
{
// Clear the screen
if (!buttonsPressed)
graphics.SetClearColor (1.0f, 0.0f, 0.0f, 0.0f);
else
graphics.SetClearColor (0.0f, 0.0f, 0.0f, 0.0f);
graphics.Clear ();
In this video you can see the background color changing from default red to black and so forth. I am pressing CTRL on the keyboard which is the equivalent to any button on the PS Vita.
Warning: may cause small seizures
No comments:
Post a Comment