SynthMaze/Assets/game/Material/SpriteGlow/Scripts/TestSpriteGlowBehaviour.cs
2024-04-28 11:26:46 +02:00

27 lines
907 B
C#

using System.Collections;
using SpriteGlow;
using UnityEngine;
public class TestSpriteGlowBehaviour : MonoBehaviour
{
private IEnumerator Start ()
{
var spriteGlow = gameObject.AddComponent<SpriteGlowEffect>();
yield return new WaitForSeconds(.5f);
spriteGlow.enabled = false;
yield return new WaitForSeconds(.5f);
spriteGlow.enabled = true;
yield return new WaitForSeconds(.5f);
spriteGlow.OutlineWidth = 5;
yield return new WaitForSeconds(.5f);
spriteGlow.DrawOutside = true;
yield return new WaitForSeconds(.5f);
spriteGlow.DrawOutside = false;
yield return new WaitForSeconds(.5f);
spriteGlow.GlowColor = Color.red;
yield return new WaitForSeconds(.5f);
spriteGlow.GlowBrightness = 1.5f;
yield return new WaitForSeconds(.5f);
Destroy(spriteGlow);
}
}