Game Development Reference
In-Depth Information
{
orientString = "Face Up";
rotAngle = 0;
}
if (Input.deviceOrientation == DeviceOrientation.Portrait)
{
orientString = "Portrait";
rotAngle = 0;
}
if (Input.deviceOrientation ==
DeviceOrientation.PortraitUpsideDown)
{
orientString = "Portrait Upside Down";
rotAngle = 180;
}
if (Input.deviceOrientation ==
DeviceOrientation.LandscapeLeft)
{
orientString = "Landscape Left";
rotAngle = 90;
}
if (Input.deviceOrientation ==
DeviceOrientation.LandscapeRight)
{
orientString = "Landscape Right";
rotAngle = —90;
}
GUI.BeginGroup (Rect (Screen.width / 2 — 200,
Screen.height / 2 — 200, 400, 400));
GUIUtility.RotateAroundPivot (rotAngle, pivotPoint);
GUI.Label (Rect (0, 0, 400, 400), orientString);
GUI.EndGroup ();
}
8.4.3 Web Services
Access to the Internet is another feature integrated into mobile devices.
People use them to surf the Web and send and receive email. This
functionality can be exploited in games to send emails from within a game
or obtain data from a Web site. For example, extra game information may
be obtained from a Web site on an as needed basis. This occurs in Parallel
Kingdom when the player wants to look up further information
on a monster or item.
Search Nedrilad ::




Custom Search