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
701 B
31 lines
701 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",
|
||
|
"Save Globals",
|
||
10 years ago
|
"Saves all current global variables to persistent storage. These can be loaded back in again in future using the LoadGlobals command. This provides a basic save game system.")]
|
||
10 years ago
|
public class SaveGlobals : 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.Save(saveName);
|
||
|
}
|
||
|
|
||
|
public override string GetSummary()
|
||
|
{
|
||
|
return saveName;
|
||
|
}
|
||
10 years ago
|
|
||
|
public override Color GetButtonColor()
|
||
|
{
|
||
|
return new Color32(235, 191, 217, 255);
|
||
|
}
|
||
10 years ago
|
}
|
||
|
|
||
|
}
|