You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

58 lines
1.5 KiB

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Bootstrap : MonoBehaviour
{
private string mod;
private float speed = 1.0f;
private UniQuake uq;
private void Start()
{
Debug.Log($"Running in {IntPtr.Size * 8}-bit mode");
}
private void OnGUI()
{
if (GUILayout.Button("Start Quake!"))
{
uq = gameObject.AddComponent<UniQuake>();
uq.BaseGame = MissionPack.Quake;
uq.ModDirectory = mod;
}
if (GUILayout.Button("Start Scourge of Armagon!"))
{
uq = gameObject.AddComponent<UniQuake>();
uq.BaseGame = MissionPack.Hipnotic;
uq.ModDirectory = mod;
}
if (GUILayout.Button("Start Dissolution of Eternity!"))
{
uq = gameObject.AddComponent<UniQuake>();
uq.BaseGame = MissionPack.Rogue;
uq.ModDirectory = mod;
}
GUILayout.Label("Mod directory:");
mod = GUILayout.TextField(mod);
GUILayout.Label("Time scale:");
speed = GUILayout.HorizontalSlider(speed, 0.1f, 5.0f, GUILayout.Width(250));
GUILayout.Label($"{speed:0.00}");
if (!Mathf.Approximately(speed, Time.timeScale))
{
Time.timeScale = speed;
}
if (uq != null && GUILayout.Button("Quit!"))
{
uq.Shutdown();
uq = null;
}
}
}