void Awake() { this.outlineRenderers = new List <LineRenderer> (); // playerNeedle = GameObject.FindGameObjectWithTag ("Player").GetComponent<PlayerAttack> (); playerNeedle = GameObject.FindObjectOfType <PlayerYuni> ().GetPlayerAttack(); fractionLabel = gameObject.GetComponent <PartitionableObjectMarker> (); #if UNITY_ANDROID mobile = GameObject.Find("Mobile UI").GetComponent <MobileUI> (); #endif playerController = GameObject.FindObjectOfType <PlayerYuni> ().GetPlayerMovement(); 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); GameController_v7.Instance.GetPauseController().Pause(); // zoomPosition = original.GetComponentInChildren<ZoomReference> ().gameObject.transform.position; // EventBroadcaster.Instance.PostEvent (EventNames.DISABLE_CAMERA); // Parameters data = new Parameters (); // Debug.Log ("X Y ZOOM IS "+zoomPosition.x+" "+zoomPosition.y); // data.PutExtra ("x", zoomPosition.x); // data.PutExtra ("y", zoomPosition.y); // EventBroadcaster.Instance.PostEvent (EventNames.ZOOM_CAMERA_TOWARDS, data); spriteRenderers = gameObject.GetComponentsInChildren <PartitionableSprite>(); this.ChangeSpriteOpacity(INTANGIBLE_OPACITY); }
void Awake() { UnityEngine.Random.InitState(3216); validDenominators = new List <int> (); fractionReference = FractionsReference.Instance(); fractionReference.AddObserver(this.RequestValidDenominators); // fractionReference.UpdateFractionRange (this.RequestValidDenominators); animator = gameObject.GetComponent <Animator> (); spriteRenderer = gameObject.GetComponent <SpriteRenderer> (); childrenSpriteRenderers = gameObject.GetComponentsInChildren <SpriteRenderer> (); this.objectCollider = gameObject.GetComponent <Collider2D> (); rigidBody2d = gameObject.GetComponent <Rigidbody2D> (); fractionLabel = gameObject.GetComponent <PartitionableObjectMarker> (); }
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); }
void Awake() { UnityEngine.Random.InitState(3216); validDenominators = new List <int> (); fractionReference = FractionsReference.Instance(); fractionReference.AddObserver(this.RequestValidDenominators); // fractionReference.UpdateFractionRange (this.RequestValidDenominators); // animator = gameObject.GetComponent<Animator> (); spriteRenderers = gameObject.GetComponentsInChildren <PartitionableSprite>(); this.hintBubble = GetComponentInChildren <HintBubbleManager> (); // spriteRenderer.color = new Color (spriteRenderer.color.r, spriteRenderer.color.g, spriteRenderer.color.b, INTANGIBLE_OPACITY); // childrenSpriteRenderers = gameObject.GetComponentsInChildren<SpriteRenderer> (); this.objectCollider = gameObject.GetComponent <Collider2D> (); rigidBody2d = gameObject.GetComponent <Rigidbody2D> (); fractionLabel = gameObject.GetComponent <PartitionableObjectMarker> (); this.disabledTransparency(); // ChangeSpriteOpacity (INTANGIBLE_OPACITY); }