This class extends TransformManagerInterface and is responsbile for informing the system of the current pose of the device. In this case, it uses the gyro to set rotational data.
Inheritance: TransformManagerInterface
 private void Awake()
 {
     manager       = GameObject.FindGameObjectWithTag("Player").GetComponent <GyroManager>();
     collider      = GetComponent <Collider2D>();
     sprite        = GetComponent <SpriteRenderer>();
     startingScale = transform.localScale;
     gameObject.SetActive(false);
 }
示例#2
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
示例#3
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
     gravityMagnitude = Physics2D.gravity.magnitude;
 }
示例#4
0
 // Use this for initialization
 void Start()
 {
     gyro = GameObject.Find("GyroManager").GetComponent <GyroManager> ();
     StartCoroutine("panelRotate");
 }