mirror of
https://github.com/ConjureETS/DeathBook.git
synced 2026-03-24 04:20:58 +00:00
33 lines
573 B
C#
33 lines
573 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
using UnityEngine.UI;
|
|
using DeathBook.Model;
|
|
|
|
public class RecentPostsPanel : MonoBehaviour
|
|
{
|
|
public Text Content;
|
|
|
|
PostGenerator _postGenerator;
|
|
|
|
private float _elapsedTime = 0f;
|
|
|
|
void Start()
|
|
{
|
|
_postGenerator = new PostGenerator();
|
|
}
|
|
|
|
void Update ()
|
|
{
|
|
_elapsedTime += Time.deltaTime;
|
|
|
|
if (_elapsedTime >= 15f)
|
|
{
|
|
Status status = _postGenerator.generateStatus();
|
|
|
|
Content.text = status.Text;
|
|
|
|
_elapsedTime = 0f;
|
|
}
|
|
}
|
|
}
|