Browse Source

Renamed Resume From Here to Resume On Load

master
Christopher 8 years ago
parent
commit
fd98c2b2b6
  1. 8
      Assets/Fungus/Scripts/Commands/SavePoint.cs
  2. 4
      Assets/Fungus/Scripts/Components/SaveManager.cs

8
Assets/Fungus/Scripts/Commands/SavePoint.cs

@ -48,8 +48,8 @@ namespace Fungus
[Tooltip("Fire a Save Point Loaded event when this command executes.")]
[SerializeField] protected bool fireEvent = true;
[Tooltip("Resume execution from here after loading this Save Point.")]
[SerializeField] protected bool resumeFromHere = true;
[Tooltip("Resume execution from this location after loading this Save Point.")]
[SerializeField] protected bool resumeOnLoad = true;
#region Public members
@ -90,9 +90,9 @@ namespace Fungus
}
/// <summary>
/// Resume execution from this command after loading a save point.
/// Resume execution from this location after loading this Save Point.
/// </summary>
public bool ResumeFromHere { get { return resumeFromHere; } }
public bool ResumeOnLoad { get { return resumeOnLoad; } }
public override void OnEnter()
{

4
Assets/Fungus/Scripts/Components/SaveManager.cs

@ -52,12 +52,12 @@ namespace Fungus
// Execute Save Point Loaded event handlers with matching key.
SavePointLoaded.NotifyEventHandlers(savePointKey);
// Execute any block containing a SavePoint command matching the save key, with Resume From Here enabled
// Execute any block containing a SavePoint command matching the save key, with Resume On Load enabled
var savePoints = Object.FindObjectsOfType<SavePoint>();
for (int i = 0; i < savePoints.Length; i++)
{
var savePoint = savePoints[i];
if (savePoint.ResumeFromHere &&
if (savePoint.ResumeOnLoad &&
string.Compare(savePoint.SavePointKey, savePointKey, true) == 0)
{
int index = savePoint.CommandIndex;

Loading…
Cancel
Save