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
Ejemplo n.º 1
0
 private void Awake()
 {
     manager       = GameObject.FindGameObjectWithTag("Player").GetComponent <GyroManager>();
     collider      = GetComponent <Collider2D>();
     sprite        = GetComponent <SpriteRenderer>();
     startingScale = transform.localScale;
     gameObject.SetActive(false);
 }
Ejemplo n.º 2
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
Ejemplo n.º 3
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
     gravityMagnitude = Physics2D.gravity.magnitude;
 }
Ejemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     gyro = GameObject.Find("GyroManager").GetComponent <GyroManager> ();
     StartCoroutine("panelRotate");
 }