Ejemplo n.º 1
0
    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> ();
    }
Ejemplo n.º 2
0
    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);
    }