Esempio n. 1
0
    private void Awake()
    {
        instance = this;

        Renderers = new List <SpriteRenderer>(GetComponentsInChildren <SpriteRenderer>());
        for (int i = 0; i < Renderers.Count; ++i)
        {
            OriginalSortOrders.Add(Renderers[i], Renderers[i].sortingOrder);
        }
        for (int i = 0; i < DayMarkers.Count; ++i)
        {
            SpriteRenderer rendo = DayMarkers[i].GetComponentInChildren <SpriteRenderer>();
            if (rendo != null)
            {
                Renderers.Add(rendo);
                if (!OriginalSortOrders.ContainsKey(rendo))
                {
                    OriginalSortOrders.Add(rendo, rendo.sortingOrder);
                }
            }
        }
        List <TextMeshPro> textrenderers = new List <TextMeshPro>(GetComponentsInChildren <TextMeshPro>());

        for (int i = 0; i < textrenderers.Count; ++i)
        {
            OriginalSortOrdersText.Add(textrenderers[i], textrenderers[i].sortingOrder);
        }
        OriginalZ      = gameObject.transform.localPosition.z;
        OriginPosition = gameObject.transform.position;
    }
Esempio n. 2
0
    private void Awake()
    {
        instance = this;

        gameObject.transform.localScale = ScaleDesk;
        RotationDesktop = gameObject.transform.rotation;

        List <SpriteRenderer> renderers = new List <SpriteRenderer>(GetComponentsInChildren <SpriteRenderer>());

        for (int i = 0; i < renderers.Count; ++i)
        {
            OriginalSortOrders.Add(renderers[i], renderers[i].sortingOrder);
        }
        List <TextMeshPro> textrenderers = new List <TextMeshPro>(GetComponentsInChildren <TextMeshPro>());

        for (int i = 0; i < textrenderers.Count; ++i)
        {
            OriginalSortOrdersText.Add(textrenderers[i], textrenderers[i].sortingOrder);
        }
        List <ParticleSystemRenderer> particlerenderers = new List <ParticleSystemRenderer>(GetComponentsInChildren <ParticleSystemRenderer>());

        for (int i = 0; i < particlerenderers.Count; ++i)
        {
            OriginalSortOrdersParticles.Add(particlerenderers[i], particlerenderers[i].sortingOrder);
        }
        OriginalZ      = gameObject.transform.localPosition.z;
        OriginPosition = gameObject.transform.position;
    }
Esempio n. 3
0
    private void Awake()
    {
        instance = this;

        List <SpriteRenderer> renderers = new List <SpriteRenderer>(GetComponentsInChildren <SpriteRenderer>());

        for (int i = 0; i < renderers.Count; ++i)
        {
            OriginalSortOrders.Add(renderers[i], renderers[i].sortingOrder);
        }
        List <TextMeshPro> textrenderers = new List <TextMeshPro>(GetComponentsInChildren <TextMeshPro>());

        for (int i = 0; i < textrenderers.Count; ++i)
        {
            OriginalSortOrdersText.Add(textrenderers[i], textrenderers[i].sortingOrder);
        }
        OriginalZ      = gameObject.transform.localPosition.z;
        OriginPosition = gameObject.transform.position;
    }
Esempio n. 4
0
    private void Awake()
    {
        instance = this;

        List <SpriteRenderer> renderers = new List <SpriteRenderer>(GetComponentsInChildren <SpriteRenderer>());

        for (int i = 0; i < renderers.Count; ++i)
        {
            OriginalSortOrders.Add(renderers[i], renderers[i].sortingOrder);
        }
        TextComponents = new List <TextMeshPro>(GetComponentsInChildren <TextMeshPro>());
        for (int i = 0; i < TextComponents.Count; ++i)
        {
            OriginalSortOrdersText.Add(TextComponents[i], TextComponents[i].sortingOrder);
        }
        OriginalZ = gameObject.transform.localPosition.z;

        Renderer.sprite          = DailyClosedSprite;
        TextLetterTop.enabled    = false;
        TextLetterBottom.enabled = false;
        TextLetterFront.enabled  = true;

        OriginPosition = gameObject.transform.position;
    }