fix: some thing for game to be built

This commit is contained in:
KOSMOGOR
2025-04-29 01:23:40 +03:00
parent cb7ec5c6b7
commit d8da83d8f2
6 changed files with 35 additions and 29 deletions
+3 -4
View File
@@ -1,12 +1,11 @@
using System.Linq;
using TMPro;
using UnityEditor;
using UnityEngine;
public class DeployButton : MonoBehaviour
{
public TMP_Text textField;
public SceneAsset level;
public string levelName;
DeployController dc;
@@ -15,11 +14,11 @@ public class DeployButton : MonoBehaviour
}
public void DeployFromButton() {
dc.Deploy(level.name);
dc.Deploy(levelName);
}
public void SetLevelInfoText() {
LevelInfo levelInfo = GameController.i.GetLevel(level.name);
LevelInfo levelInfo = GameController.i.GetLevel(levelName);
string s = $"HP: {levelInfo.hp}/{levelInfo.maxHp}\nEnemies: {levelInfo.enemies.Values.Sum(x => x)}\nBullet type: {GameController.GetBulletTypeString(levelInfo.factory)}";
textField.text = s;
}