Bug fix 0.1
Rage Runner (Early Access) » Devlog
Platformer.UI (False)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Platformer.UI
{
/// <summary>
/// A simple controller for switching between UI panels.
/// </summary>
public class MainUIController : MonoBehaviour
{
public GameObject[] panels;
public void SetActivePanel(int index)
{
for (var i = 0; i < panels.Length; i++)
{
var active = i == index;
var g = panels[i];
if (g.activeSelf != active) g.SetActive(active);
}
}
void OnEnable()
{
SetActivePanel(0);
}
}
}
Files
Bug fix.zip Play in browser
Aug 21, 2020
Rage Runner (Early Access)
My first game in Unity game engine
Status | Canceled |
Author | KIngkeeper_01 |
Genre | Platformer |
More posts
- Bug Fix 0.2Aug 21, 2020
Leave a comment
Log in with itch.io to leave a comment.