예제 #1
0
    public void ChangeSprite(GroundType type, bool isSpeed = false)
    {
        if (background != null)
        {
            if ((int)type == 99)
            {
                background.sprite = GetSprites[4];
            }
            else if ((int)type == 0)
            {
                light.Stop(Color.white);
                background.sprite = GetSprites[0];
                light.gameObject.SetActive(false);
            }
            else
            {
                background.sprite = GetSprites[0];
                light.gameObject.SetActive(true);

                light.SetFromAndTo(Color.white, colorTransparent);
                light.PlayForward(System.Convert.ToInt32(!isSpeed));
                colorLight.SetFromAndTo(lightColor[(int)type - 1], (lightColor[(int)type - 1] * colorTransparent));
                colorLight.PlayForward(System.Convert.ToInt32(!isSpeed));
            }
        }
    }
예제 #2
0
 // Start is called before the first frame update
 void Start()
 {
     tc.SetFromAndTo(a, b);
     tc.PlayForward(1);
 }