mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-27 03:53:01 +00:00
70962f50a0
There's now a "type" dropdown menu that allows you to choose between "Normal", "Yellow", "Blue", and "Custom". Custom will use the color specified in the Custom Color field
24 lines
494 B
C#
24 lines
494 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class SpriteFlicker : MonoBehaviour
|
|
{
|
|
|
|
public float flickerInterval;
|
|
|
|
SpriteRenderer sr;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
sr = GetComponent<SpriteRenderer>();
|
|
InvokeRepeating("ToggleVisibility", 0f, flickerInterval);
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void ToggleVisibility()
|
|
{
|
|
sr.enabled = !sr.enabled;
|
|
}
|
|
}
|