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.
33 lines
843 B
33 lines
843 B
10 years ago
|
using UnityEngine;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
|
||
|
namespace Fungus
|
||
|
{
|
||
|
[CommandInfo("Scripting",
|
||
|
"Reset",
|
||
10 years ago
|
"Resets the state of all commands and local and global variables in the Fungus Script.")]
|
||
10 years ago
|
public class Reset : Command
|
||
|
{
|
||
10 years ago
|
[Tooltip("Reset state of all commands in the script")]
|
||
10 years ago
|
public bool resetCommands = true;
|
||
10 years ago
|
|
||
|
[Tooltip("Reset local variables back to their default values")]
|
||
10 years ago
|
public bool resetLocalVariables = true;
|
||
10 years ago
|
|
||
|
[Tooltip("Reset global variables back to their default values")]
|
||
10 years ago
|
public bool resetGlobalVariables = true;
|
||
|
|
||
10 years ago
|
public override void OnEnter()
|
||
|
{
|
||
10 years ago
|
GetFungusScript().Reset(resetCommands, resetLocalVariables, resetGlobalVariables);
|
||
10 years ago
|
Continue();
|
||
|
}
|
||
|
|
||
|
public override Color GetButtonColor()
|
||
|
{
|
||
|
return new Color32(235, 191, 217, 255);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|