public void InvertAndPlayAgain() { SimpleAnimation anim = simpleAnimationsManager.GetAnimation(0); anim.mirror = !anim.mirror; simpleAnimationsManager.Play(anim); // Same result using: // simpleAnimationsManager.Play(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); }
public void ApplyColorToImage(Image imageToChangeColor) { ColorAnimation colorAnimation = ((ColorAnimation)simpleAnimationsManager.GetAnimation("Color")); imageToChangeColor.color = colorAnimation.colorToAnimate; }
public void ApplyFloatToText(Text text) { FloatAnimation floatAnimation = ((FloatAnimation)simpleAnimationsManager.GetAnimation("Float")); text.text = floatAnimation.floatToAnimate.ToString(); }