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.
31 lines
609 B
31 lines
609 B
10 years ago
|
using UnityEngine;
|
||
10 years ago
|
using System;
|
||
|
using System.Collections;
|
||
|
|
||
10 years ago
|
namespace Fungus
|
||
10 years ago
|
{
|
||
10 years ago
|
[CommandInfo("Scripting",
|
||
|
"Load Globals",
|
||
10 years ago
|
"Loads a set of global variables previously saved using the Save Globals command.")]
|
||
10 years ago
|
public class LoadGlobals : Command
|
||
10 years ago
|
{
|
||
10 years ago
|
[Tooltip("Save Name of saved global variable values")]
|
||
10 years ago
|
public string saveName = "";
|
||
|
|
||
|
public override void OnEnter()
|
||
|
{
|
||
|
GlobalVariables.Load(saveName);
|
||
|
}
|
||
|
|
||
|
public override string GetSummary()
|
||
|
{
|
||
|
return saveName;
|
||
|
}
|
||
10 years ago
|
|
||
|
public override Color GetButtonColor()
|
||
|
{
|
||
|
return new Color32(235, 191, 217, 255);
|
||
|
}
|
||
10 years ago
|
}
|
||
|
|
||
|
}
|