28 lines
817 B
C#
28 lines
817 B
C#
using Lean.Pool;
|
|
using SLSUtilities.General;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Cielonos.MainGame.UI
|
|
{
|
|
public class PolychromeExtraUIContainer : MainWeaponExtraUIContainer
|
|
{
|
|
public GameObject techniqueStarPrefab;
|
|
public HorizontalLayoutGroup layoutGroup;
|
|
|
|
public void SetStars(int starCount)
|
|
{
|
|
int currentStars = layoutGroup.transform.childCount;
|
|
if (starCount != currentStars)
|
|
{
|
|
layoutGroup.transform.DespawnAllChildren();
|
|
|
|
for (int i = 0; i < starCount; i++)
|
|
{
|
|
GameObject star = LeanPool.Spawn(techniqueStarPrefab, layoutGroup.transform);
|
|
star.SetActive(true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |