integration
bad other team code on another branch
This commit is contained in:
parent
7925fd966a
commit
521a62973a
278 changed files with 11344 additions and 0 deletions
38
Assets/UI Scripts/EnemiesAliveManager.cs
Executable file
38
Assets/UI Scripts/EnemiesAliveManager.cs
Executable 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();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue