2020-04-18 20:45:36 +00:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
public class MicrogamePanel : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
private GameController gameController;
|
|
|
|
|
private Text text;
|
|
|
|
|
|
|
|
|
|
private void Awake() {
|
|
|
|
|
gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameController>();
|
|
|
|
|
text = GetComponent<Text>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Start() {
|
|
|
|
|
gameController.OnDisplayedMicrogameChange += OnDisplayedMicrogameChange;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnDisplayedMicrogameChange(MicrogameController previous, MicrogameController current) {
|
|
|
|
|
text.text = current.microgameName;
|
2020-04-19 01:48:15 +00:00
|
|
|
|
text.color = current.microgameNameColor;
|
|
|
|
|
text.font = current.microgameNameFont;
|
2020-04-18 20:45:36 +00:00
|
|
|
|
}
|
|
|
|
|
}
|