add view class
This commit is contained in:
parent
d92b322ab2
commit
743ed91ab1
|
|
@ -0,0 +1,18 @@
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
namespace MyGame.Scenes.MiniGame.Scripts
|
||||||
|
{
|
||||||
|
public class StageSelectItemView : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] private Text stageName;
|
||||||
|
[SerializeField] private Text stageHiScore;
|
||||||
|
[SerializeField] private Button button;
|
||||||
|
|
||||||
|
public void SetStageName(string text) => stageName.text = text;
|
||||||
|
|
||||||
|
public void SetStageHiScore(int num) => stageHiScore.text = num.ToString();
|
||||||
|
|
||||||
|
public Button Button => button;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1fbc47cb269c4e97947061d6f377e859
|
||||||
|
timeCreated: 1655441110
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
namespace MyGame.Scenes.MiniGame.Scripts
|
||||||
|
{
|
||||||
|
public class StageSelectView : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] private Text nameText;
|
||||||
|
[SerializeField] private ScrollRect scrollRect;
|
||||||
|
[SerializeField] private Text totalScore;
|
||||||
|
[SerializeField] private StageSelectItemView itemViewPrefab;
|
||||||
|
|
||||||
|
public ScrollRect ScrollRect => scrollRect;
|
||||||
|
|
||||||
|
public void SetName(string text) => nameText.text = text;
|
||||||
|
|
||||||
|
public void SetScore(int num) => totalScore.text = num.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a496a110325c47a18a0e9c6e60376b57
|
||||||
|
timeCreated: 1655440523
|
||||||
Loading…
Reference in New Issue