integration

bad other team code on another branch
This commit is contained in:
Crizomb 2025-01-28 23:58:50 +01:00
parent 7925fd966a
commit 521a62973a
278 changed files with 11344 additions and 0 deletions

View file

@ -0,0 +1,38 @@
using UnityEngine;
using TMPro;
public class EnemiesAliveManager : MonoBehaviour
{
[SerializeField] GameManager gameManager;
[SerializeField] GameObject enemiesAliveCanvas;
[SerializeField] GameObject enemiesAliveDisplay;
private TextMeshProUGUI enemiesAliveMesh;
private bool switchedCanvasOn = false;
private bool switchedCanvasOff = false;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
enemiesAliveMesh = enemiesAliveDisplay.GetComponent<TextMeshProUGUI>();
enemiesAliveCanvas.SetActive(false);
}
// Update is called once per frame
void Update()
{
if (!switchedCanvasOn && gameManager.combatPhase)
{
enemiesAliveCanvas.SetActive(true);
switchedCanvasOn = true;
}
if (switchedCanvasOn && !switchedCanvasOff && !gameManager.combatPhase)
{
enemiesAliveCanvas.SetActive(false);
switchedCanvasOff = true;
}
enemiesAliveMesh.text = "Ennemies En Vie : " + gameManager.armyManager.getArmy(true).Count.ToString();
}
}