private void Awake() { if (instance != null && instance != this) { Destroy(gameObject); } else { instance = this; } }
void Awake() { player = GameObject.FindObjectOfType <PlayerYuni> (); // playerNeedle = GameObject.FindGameObjectWithTag ("Player").GetComponent<PlayerAttack> (); // pauseController = GameObject.FindGameObjectWithTag ("GameController").GetComponent<PauseController> (); fillController = GameObject.FindGameObjectWithTag("GameController").GetComponent <FillController> (); fractionLabel = gameObject.GetComponent <PartitionableObjectMarker> (); #if UNITY_ANDROID mobile = GameObject.Find("Mobile UI").GetComponent <MobileUI> (); #endif // playerController = GameObject.FindGameObjectWithTag ("Player").GetComponent<PlayerMovement> (); partitionPointer = -1; // gameObject.transform.position = new Vector3 (0, 0, gameObject.transform.position.z); // gameObject.transform.SetPositionAndRotation (new Vector3 (0, 0, gameObject.transform.position.z), Quaternion.identity); // gameObject.transform.localPosition = new Vector3 (0, 0, gameObject.transform.position.z); }