Difference between revisions of "DeviceOrientationDetector"

From Headbone Creative
Jump to: navigation, search
(Updating API info)
(Updating API info)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
This script keeps track of the current [http://en.wikipedia.org/wiki/Aspect_ratio_(image) aspect ratio] of the screen. When the aspect ratio changes, it notifies all [[DeviceOrientationListener]]s in the scene. There only needs to be one of these in the scene.   
+
This script keeps track of the current size of the screen. When the aspect ratio changes, it notifies all [[DeviceOrientationListener]]s in the scene. There only needs to be one of these in the scene.  The new screen width and height are passed to the listeners when the orientation changes.
  
 
== Public Functions ==
 
== Public Functions ==

Latest revision as of 03:02, 18 April 2013

This script keeps track of the current size of the screen. When the aspect ratio changes, it notifies all DeviceOrientationListeners in the scene. There only needs to be one of these in the scene. The new screen width and height are passed to the listeners when the orientation changes.

[edit] Public Functions

[edit] void FindAllListeners ()

This is called on Start to find all listeners in the scene. It can be called at other times if new listeners are added after the scene begins.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox