private void Awake() { manager = GameObject.FindGameObjectWithTag("Player").GetComponent <GyroManager>(); collider = GetComponent <Collider2D>(); sprite = GetComponent <SpriteRenderer>(); startingScale = transform.localScale; gameObject.SetActive(false); }
void Awake() { if (Instance == null) { Instance = this; } else { Destroy(this); } }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(this.gameObject); } gravityMagnitude = Physics2D.gravity.magnitude; }
// Use this for initialization void Start() { gyro = GameObject.Find("GyroManager").GetComponent <GyroManager> (); StartCoroutine("panelRotate"); }