update: deploy buttons

This commit is contained in:
KOSMOGOR
2025-04-26 21:35:36 +03:00
parent 97abae3080
commit 6338e20f01
19 changed files with 1565 additions and 1719 deletions
+26
View File
@@ -0,0 +1,26 @@
using System.Linq;
using TMPro;
using UnityEditor;
using UnityEngine;
public class DeployButton : MonoBehaviour
{
public TMP_Text textField;
public SceneAsset level;
DeployController dc;
void Start() {
dc = FindFirstObjectByType<DeployController>();
}
public void DeployFromButton() {
dc.Deploy(level.name);
}
public void SetLevelInfoText() {
LevelInfo levelInfo = GameController.i.GetLevel(level.name);
string s = $"HP: {levelInfo.hp}/{levelInfo.maxHp}\nEnemies: {levelInfo.enemies.Values.Sum(x => x)}\nBullet type: {GameController.GetBulletTypeString(levelInfo.factory)}";
textField.text = s;
}
}