Multiple entities
This commit is contained in:
1 parent
ccc4c04234
commit
1de0e93ae0
5677 files changed
+364912
-919855
No files matched your search
@@ -0,0 +1,12 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Code.OfficeGame.BattleMode.UI
|
||||
{
|
||||
public class BattleActionDecisionButton : MonoBehaviour
|
||||
{
|
||||
public TMP_Text text;
|
||||
public Button button;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9bf452c1274f4e78b36e619ddd26f0ae
|
||||
timeCreated: 1792771940
|
||||
@@ -14,9 +14,9 @@ namespace Code.OfficeGame.BattleMode.UI
|
||||
public class BattleActionDecisionPanel : UIPanel
|
||||
{
|
||||
[SerializeField] private float duration = 0.35f;
|
||||
[SerializeField] private Button actionButtonPrefab;
|
||||
[SerializeField] private BattleActionDecisionButton actionButtonPrefab;
|
||||
|
||||
private List<Button> _actionButtons = new();
|
||||
private List<BattleActionDecisionButton> _actionButtons = new();
|
||||
|
||||
private UniTaskCompletionSource<BattleActionType> _decisionCompletionSource;
|
||||
private MotionHandle _motionHandle;
|
||||
@@ -35,9 +35,9 @@ namespace Code.OfficeGame.BattleMode.UI
|
||||
|
||||
_actionButtons.Add(button);
|
||||
|
||||
button.onClick.AddListener(() => _decisionCompletionSource.TrySetResult(action));
|
||||
button.button.onClick.AddListener(() => _decisionCompletionSource.TrySetResult(action));
|
||||
|
||||
//button.GetComponentInChildren<Text>().text = action.ToString();
|
||||
button.text.text = action.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user