コード例 #1
0
        public void InvertAndPlayAgain()
        {
            SimpleAnimation anim = simpleAnimationsManager.GetAnimation(0);

            anim.mirror = !anim.mirror;
            simpleAnimationsManager.Play(anim);

            // Same result using:
            // simpleAnimationsManager.Play(0);
        }
コード例 #2
0
    public void Loop()
    {
        if (GameManager.Instance.hasCameraControl)
        {
            light.color = new Color(0f, 0.75f, 0.1f);
            return;
        }

        SimpleAnimation animation = simpleAnimationsManager.GetAnimation(0);

        animation.mirror = !animation.mirror;
        simpleAnimationsManager.Play(animation);
    }
コード例 #3
0
        public void ApplyColorToImage(Image imageToChangeColor)
        {
            ColorAnimation colorAnimation = ((ColorAnimation)simpleAnimationsManager.GetAnimation("Color"));

            imageToChangeColor.color = colorAnimation.colorToAnimate;
        }
コード例 #4
0
        public void ApplyFloatToText(Text text)
        {
            FloatAnimation floatAnimation = ((FloatAnimation)simpleAnimationsManager.GetAnimation("Float"));

            text.text = floatAnimation.floatToAnimate.ToString();
        }