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
711 B
31 lines
711 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 Flowchart.")]
|
||
10 years ago
|
[AddComponentMenu("")]
|
||
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
|
|
||
10 years ago
|
[Tooltip("Reset variables back to their default values")]
|
||
|
public bool resetVariables = true;
|
||
10 years ago
|
|
||
10 years ago
|
public override void OnEnter()
|
||
|
{
|
||
10 years ago
|
GetFlowchart().Reset(resetCommands, resetVariables);
|
||
10 years ago
|
Continue();
|
||
|
}
|
||
|
|
||
|
public override Color GetButtonColor()
|
||
|
{
|
||
|
return new Color32(235, 191, 217, 255);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|