Added info text

This commit is contained in:
2026-01-14 12:03:15 +00:00
parent c3a0e39c65
commit 0c43fc1112
5 changed files with 101 additions and 6 deletions

View File

@@ -17,10 +17,14 @@ namespace InterfaceOff
public override void OnWindowInstantiation()
{
Sprite[] sprites = CanvasManager.Instance.Images.GetRandomSpriteSet();
/* Lets the player know what to do via text */
Components.InfoText.text = "Rotate";
/* Creates the images to rotate */
Sprite[] sprites = CanvasManager.Instance.Images.GetRandomSpriteSet();
for (int i = 0; i < 4; i++)
{
/* Fetches/Creates needed components */
GameObject go = Instantiate(CanvasManager.Instance.ImagePrefab, transform);
RectTransform t = go.GetComponent<RectTransform>();
@@ -32,6 +36,7 @@ namespace InterfaceOff
img.material = new Material(Shader.Find("UI/Default"));
img.sprite = sprites[i];
/* Adds a function to the buttons for them to rotate */
Button button = go.GetComponent<Button>();
button.onClick.AddListener(() =>
{
@@ -54,7 +59,7 @@ namespace InterfaceOff
}
}
private void Update()
public override void OnWindowClicked()
{
if (m_TilesRotatedCorrectly == 4)
{