Added info text
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user