Insanely huge initial commit

This commit is contained in:
2026-02-21 17:04:05 -08:00
parent 9cdd36191a
commit 613d75914a
22525 changed files with 4035207 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemyLaserController : MonoBehaviour
{
[SerializeField] List<Color> colors;
[SerializeField] float fadeDuration; // seconds per color
int colorIndex = 0;
SpriteRenderer sprite;
float fadeTime = 0;
// Start is called before the first frame update
void Start()
{
sprite = GetComponent<SpriteRenderer>();
}
// Update is called once per frame
void Update()
{
sprite.color = Color.Lerp(colors[colorIndex], colors[(colorIndex+1)%colors.Count], fadeTime);
fadeTime += Time.deltaTime / fadeDuration;
if (fadeTime >= 1f) {
colorIndex = (colorIndex + 1) % colors.Count;
fadeTime = 0;
}
}
}