using UnityEngine; namespace Platformer.Mechanics { /// /// 몬스터 종류 랜덤 영역 — 6 색상 random tint·Animator 정합 유지. /// PD 지시 (2026-05-11): 몬스터 랜덤 변경. /// Animator (Idle·Run·Hurt·Death) 영역 + SpriteRenderer.color 6종 random. /// public class MonsterRandomizer : MonoBehaviour { [Tooltip("이전 호환 — Inspector idle frames 필드 (실제 영역 X·후속 폐기 가능)")] public Sprite[] idleFrames; // 6 색상 random tint static readonly Color[] _tints = new Color[] { new Color(1.00f, 1.00f, 1.00f), // White (default) new Color(1.00f, 0.50f, 0.50f), // Red new Color(0.50f, 1.00f, 0.50f), // Green new Color(0.50f, 0.70f, 1.00f), // Blue new Color(1.00f, 1.00f, 0.50f), // Yellow new Color(0.85f, 0.50f, 1.00f), // Purple }; void Awake() { var sr = GetComponent(); if (sr == null) return; int idx = Random.Range(0, _tints.Length); sr.color = _tints[idx]; } } }