40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
using UnityEngine;
|
|
using System.Collections;
|
|
using UnityEngine.UI;
|
|
using UnityEngine.Events;
|
|
|
|
public class Gui_VotePendre : MonoBehaviour {
|
|
|
|
private Button votePenduInnocentButton;
|
|
private Button votePenduCoupableButton;
|
|
|
|
// Use this for initialization
|
|
void Start () {
|
|
votePenduInnocentButton = GameObject.Find("ButtonInnocent").GetComponent<Button>();
|
|
votePenduCoupableButton = GameObject.Find("ButtonCoupable").GetComponent<Button>();
|
|
|
|
votePenduInnocentButton.interactable = true;
|
|
votePenduCoupableButton.interactable = true;
|
|
|
|
votePenduInnocentButton.GetComponentInChildren<Text>().text = "test";
|
|
|
|
votePenduInnocentButton.onClick.AddListener(() => InnocentClicked());
|
|
votePenduCoupableButton.onClick.AddListener(() => CoupableClicked());
|
|
|
|
}
|
|
|
|
void InnocentClicked()
|
|
{
|
|
Debug.Log("Innocent");
|
|
}
|
|
|
|
void CoupableClicked()
|
|
{
|
|
Debug.Log("Coupable");
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update () {
|
|
|
|
}
|
|
} |