-
Notifications
You must be signed in to change notification settings - Fork 1
/
SCR_GUI.cs
29 lines (26 loc) · 878 Bytes
/
SCR_GUI.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
using System.Linq;
using System.Text;
namespace FreeCell
{
/// <summary>
/// This class implements the buttons to interact with the SC Rummy game
/// </summary>
public class SCR_GUI : MonoBehaviour
{
void OnGUI()
{
if (GUI.Button(new Rect(10, Screen.height - 60, 50, 50), "Undo"))
FreeCellBehavior.Instance.Undo();
if (GUI.Button(new Rect(70, Screen.height - 60, 90, 50), "New Game"))
{
StaircaseRummyBehavior.MaxStaircaseStack = 9;
StaircaseRummyBehavior.Suits = 8;
StaircaseRummyBehavior.Instance.StartCoroutine(StaircaseRummyBehavior.Instance.NewGame(UnityEngine.Random.Range(1, 20000)));
}
}
}
}