neon_run/Assets/Scripts/LivesVisualizer.cs
2025-11-13 04:08:12 +05:30

15 lines
361 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LivesVisualizer : MonoBehaviour
{
public Transform livesParent;
public void SetLives(int lives){
for(int i = 0; i < livesParent.childCount; i++){
livesParent.GetChild(i).gameObject.SetActive(i < lives);
}
}
}