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.")] [Tooltip("Fire a Save Point Loaded event when this command executes.")]
[SerializeField] protected bool fireEvent = true; [SerializeField] protected bool fireEvent = true;
[Tooltip("Resume execution from here after loading this Save Point.")] [Tooltip("Resume execution from this location after loading this Save Point.")]
[SerializeField] protected bool resumeFromHere = true; [SerializeField] protected bool resumeOnLoad = true;
#region Public members #region Public members
@ -90,9 +90,9 @@ namespace Fungus
} }
/// <summary> /// <summary>
/// Resume execution from this command after loading a save point. /// Resume execution from this location after loading this Save Point.
/// </summary> /// </summary>
public bool ResumeFromHere { get { return resumeFromHere; } } public bool ResumeOnLoad { get { return resumeOnLoad; } }
public override void OnEnter() 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. // Execute Save Point Loaded event handlers with matching key.
SavePointLoaded.NotifyEventHandlers(savePointKey); 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>(); var savePoints = Object.FindObjectsOfType<SavePoint>();
for (int i = 0; i < savePoints.Length; i++) for (int i = 0; i < savePoints.Length; i++)
{ {
var savePoint = savePoints[i]; var savePoint = savePoints[i];
if (savePoint.ResumeFromHere && if (savePoint.ResumeOnLoad &&
string.Compare(savePoint.SavePointKey, savePointKey, true) == 0) string.Compare(savePoint.SavePointKey, savePointKey, true) == 0)
{ {
int index = savePoint.CommandIndex; int index = savePoint.CommandIndex;

Loading…
Cancel
Save