diff --git a/Assets/Fungus/Animation/Scripts/Commands/PlayAnimState.cs b/Assets/Fungus/Animation/Scripts/Commands/PlayAnimState.cs
index f958ec8c..f6f31d24 100644
--- a/Assets/Fungus/Animation/Scripts/Commands/PlayAnimState.cs
+++ b/Assets/Fungus/Animation/Scripts/Commands/PlayAnimState.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Plays a state of an animator according to the state name.
+ ///
[CommandInfo("Animation",
"Play Anim State",
"Plays a state of an animator according to the state name")]
@@ -16,16 +15,16 @@ namespace Fungus
public class PlayAnimState : Command
{
[Tooltip("Reference to an Animator component in a game object")]
- public AnimatorData animator = new AnimatorData();
+ [SerializeField] protected AnimatorData animator = new AnimatorData();
[Tooltip("Name of the state you want to play")]
- public StringData stateName = new StringData();
+ [SerializeField] protected StringData stateName = new StringData();
[Tooltip("Layer to play animation on")]
- public IntegerData layer = new IntegerData(-1);
+ [SerializeField] protected IntegerData layer = new IntegerData(-1);
[Tooltip("Start time of animation")]
- public FloatData time = new FloatData(0f);
+ [SerializeField] protected FloatData time = new FloatData(0f);
public override void OnEnter()
{
@@ -51,7 +50,6 @@ namespace Fungus
{
return new Color32(170, 204, 169, 255);
}
- }
-
+ }
}
diff --git a/Assets/Fungus/Animation/Scripts/Commands/ResetAnimTrigger.cs b/Assets/Fungus/Animation/Scripts/Commands/ResetAnimTrigger.cs
index 9809d246..f33c37ea 100644
--- a/Assets/Fungus/Animation/Scripts/Commands/ResetAnimTrigger.cs
+++ b/Assets/Fungus/Animation/Scripts/Commands/ResetAnimTrigger.cs
@@ -1,15 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Resets a trigger parameter on an Animator component.
+ ///
[CommandInfo("Animation",
"Reset Anim Trigger",
"Resets a trigger parameter on an Animator component.")]
@@ -18,10 +17,10 @@ namespace Fungus
public class ResetAnimTrigger : Command
{
[Tooltip("Reference to an Animator component in a game object")]
- public AnimatorData _animator;
+ [SerializeField] protected AnimatorData _animator;
[Tooltip("Name of the trigger Animator parameter that will be reset")]
- public StringData _parameterName;
+ [SerializeField] protected StringData _parameterName;
public override void OnEnter()
{
@@ -70,5 +69,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Animation/Scripts/Commands/SetAnimBool.cs b/Assets/Fungus/Animation/Scripts/Commands/SetAnimBool.cs
index 30e22f5c..51f98e42 100644
--- a/Assets/Fungus/Animation/Scripts/Commands/SetAnimBool.cs
+++ b/Assets/Fungus/Animation/Scripts/Commands/SetAnimBool.cs
@@ -1,15 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Sets a boolean parameter on an Animator component to control a Unity animation"
+ ///
[CommandInfo("Animation",
"Set Anim Bool",
"Sets a boolean parameter on an Animator component to control a Unity animation")]
@@ -18,13 +17,13 @@ namespace Fungus
public class SetAnimBool : Command
{
[Tooltip("Reference to an Animator component in a game object")]
- public AnimatorData _animator;
+ [SerializeField] protected AnimatorData _animator;
[Tooltip("Name of the boolean Animator parameter that will have its value changed")]
- public StringData _parameterName;
+ [SerializeField] protected StringData _parameterName;
[Tooltip("The boolean value to set the parameter to")]
- public BooleanData value;
+ [SerializeField] protected BooleanData value;
public override void OnEnter()
{
@@ -73,5 +72,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Animation/Scripts/Commands/SetAnimFloat.cs b/Assets/Fungus/Animation/Scripts/Commands/SetAnimFloat.cs
index 2040c701..9def4753 100644
--- a/Assets/Fungus/Animation/Scripts/Commands/SetAnimFloat.cs
+++ b/Assets/Fungus/Animation/Scripts/Commands/SetAnimFloat.cs
@@ -1,15 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Sets a float parameter on an Animator component to control a Unity animation.
+ ///
[CommandInfo("Animation",
"Set Anim Float",
"Sets a float parameter on an Animator component to control a Unity animation")]
@@ -18,13 +17,13 @@ namespace Fungus
public class SetAnimFloat : Command
{
[Tooltip("Reference to an Animator component in a game object")]
- public AnimatorData _animator;
+ [SerializeField] protected AnimatorData _animator;
[Tooltip("Name of the float Animator parameter that will have its value changed")]
- public StringData _parameterName;
+ [SerializeField] protected StringData _parameterName;
[Tooltip("The float value to set the parameter to")]
- public FloatData value;
+ [SerializeField] protected FloatData value;
public override void OnEnter()
{
@@ -73,5 +72,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Animation/Scripts/Commands/SetAnimInteger.cs b/Assets/Fungus/Animation/Scripts/Commands/SetAnimInteger.cs
index 96d723f5..322928ce 100644
--- a/Assets/Fungus/Animation/Scripts/Commands/SetAnimInteger.cs
+++ b/Assets/Fungus/Animation/Scripts/Commands/SetAnimInteger.cs
@@ -1,15 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Sets an integer parameter on an Animator component to control a Unity animation.
+ ///
[CommandInfo("Animation",
"Set Anim Integer",
"Sets an integer parameter on an Animator component to control a Unity animation")]
@@ -18,13 +17,13 @@ namespace Fungus
public class SetAnimInteger : Command
{
[Tooltip("Reference to an Animator component in a game object")]
- public AnimatorData _animator;
+ [SerializeField] protected AnimatorData _animator;
[Tooltip("Name of the integer Animator parameter that will have its value changed")]
- public StringData _parameterName;
+ [SerializeField] protected StringData _parameterName;
[Tooltip("The integer value to set the parameter to")]
- public IntegerData value;
+ [SerializeField] protected IntegerData value;
public override void OnEnter()
{
@@ -73,5 +72,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Animation/Scripts/Commands/SetAnimTrigger.cs b/Assets/Fungus/Animation/Scripts/Commands/SetAnimTrigger.cs
index da300a21..80120ec6 100644
--- a/Assets/Fungus/Animation/Scripts/Commands/SetAnimTrigger.cs
+++ b/Assets/Fungus/Animation/Scripts/Commands/SetAnimTrigger.cs
@@ -1,15 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Sets a trigger parameter on an Animator component to control a Unity animation.
+ ///
[CommandInfo("Animation",
"Set Anim Trigger",
"Sets a trigger parameter on an Animator component to control a Unity animation")]
@@ -18,10 +17,10 @@ namespace Fungus
public class SetAnimTrigger : Command
{
[Tooltip("Reference to an Animator component in a game object")]
- public AnimatorData _animator;
+ [SerializeField] protected AnimatorData _animator;
[Tooltip("Name of the trigger Animator parameter that will have its value changed")]
- public StringData _parameterName;
+ [SerializeField] protected StringData _parameterName;
public override void OnEnter()
{
@@ -70,5 +69,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Audio/Editor/ControlAudioEditor.cs b/Assets/Fungus/Audio/Editor/ControlAudioEditor.cs
index e6f7af58..95cbe4f4 100644
--- a/Assets/Fungus/Audio/Editor/ControlAudioEditor.cs
+++ b/Assets/Fungus/Audio/Editor/ControlAudioEditor.cs
@@ -1,18 +1,8 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
-using UnityEditorInternal;
using UnityEngine;
-using UnityEngine.UI;
-using UnityEngine.Events;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using Rotorz.ReorderableList;
-
namespace Fungus
{
@@ -49,11 +39,11 @@ namespace Fungus
EditorGUILayout.PropertyField(controlProp);
EditorGUILayout.PropertyField(audioSourceProp);
string fadeLabel = "Fade Out Duration";
- if (t.control != ControlAudio.controlType.StopLoop && t.control != ControlAudio.controlType.PauseLoop)
+ if (t.Control != ControlAudio.controlType.StopLoop && t.Control != ControlAudio.controlType.PauseLoop)
{
fadeLabel = "Fade In Duration";
string volumeLabel = "End Volume";
- if (t.control == ControlAudio.controlType.ChangeVolume)
+ if (t.Control == ControlAudio.controlType.ChangeVolume)
{
fadeLabel = "Fade Duration";
volumeLabel = "New Volume";
diff --git a/Assets/Fungus/Audio/Scripts/Commands/ControlAudio.cs b/Assets/Fungus/Audio/Scripts/Commands/ControlAudio.cs
index a8abfd46..7eb3ac90 100644
--- a/Assets/Fungus/Audio/Scripts/Commands/ControlAudio.cs
+++ b/Assets/Fungus/Audio/Scripts/Commands/ControlAudio.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Plays, loops, or stops an audiosource. Any AudioSources with the same tag as the target Audio Source will automatically be stoped.
+ ///
[CommandInfo("Audio",
"Control Audio",
"Plays, loops, or stops an audiosource. Any AudioSources with the same tag as the target Audio Source will automatically be stoped.")]
@@ -25,24 +26,25 @@ namespace Fungus
}
[Tooltip("What to do to audio")]
- public controlType control;
+ [SerializeField] protected controlType control;
+ public controlType Control { get { return control; } }
[Tooltip("Audio clip to play")]
- public AudioSourceData _audioSource;
+ [SerializeField] protected AudioSourceData _audioSource;
[Range(0,1)]
[Tooltip("Start audio at this volume")]
- public float startVolume = 1;
+ [SerializeField] protected float startVolume = 1;
[Range(0,1)]
[Tooltip("End audio at this volume")]
- public float endVolume = 1;
+ [SerializeField] protected float endVolume = 1;
[Tooltip("Time to fade between current volume level and target volume level.")]
- public float fadeDuration;
+ [SerializeField] protected float fadeDuration;
[Tooltip("Wait until this command has finished before executing the next command.")]
- public bool waitUntilFinished = false;
+ [SerializeField] protected bool waitUntilFinished = false;
public override void OnEnter()
{
@@ -83,10 +85,8 @@ namespace Fungus
}
}
- /**
- * If there's other music playing in the scene, assign it the same tag as the new music you want to play and
- * the old music will be automatically stopped.
- */
+ // If there's other music playing in the scene, assign it the same tag as the new music you want to play and
+ // the old music will be automatically stopped.
protected void StopAudioWithSameTag()
{
// Don't stop audio if there's no tag assigned
@@ -287,6 +287,5 @@ namespace Fungus
}
#endregion
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/Audio/Scripts/Commands/PlayMusic.cs b/Assets/Fungus/Audio/Scripts/Commands/PlayMusic.cs
index a4e97d89..7646997e 100644
--- a/Assets/Fungus/Audio/Scripts/Commands/PlayMusic.cs
+++ b/Assets/Fungus/Audio/Scripts/Commands/PlayMusic.cs
@@ -1,13 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Plays looping game music. If any game music is already playing, it is stopped. Game music will continue playing across scene loads.
+ ///
[CommandInfo("Audio",
"Play Music",
"Plays looping game music. If any game music is already playing, it is stopped. Game music will continue playing across scene loads.")]
@@ -15,16 +15,16 @@ namespace Fungus
public class PlayMusic : Command
{
[Tooltip("Music sound clip to play")]
- public AudioClip musicClip;
+ [SerializeField] protected AudioClip musicClip;
[Tooltip("Time to begin playing in seconds. If the audio file is compressed, the time index may be inaccurate.")]
- public float atTime;
+ [SerializeField] protected float atTime;
[Tooltip("The music will start playing again at end.")]
- public bool loop = true;
+ [SerializeField] protected bool loop = true;
[Tooltip("Length of time to fade out previous playing music.")]
- public float fadeDuration = 1f;
+ [SerializeField] protected float fadeDuration = 1f;
public override void OnEnter()
{
@@ -53,5 +53,4 @@ namespace Fungus
return new Color32(242, 209, 176, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Audio/Scripts/Commands/PlaySound.cs b/Assets/Fungus/Audio/Scripts/Commands/PlaySound.cs
index 2d4b1839..f150e06b 100644
--- a/Assets/Fungus/Audio/Scripts/Commands/PlaySound.cs
+++ b/Assets/Fungus/Audio/Scripts/Commands/PlaySound.cs
@@ -1,13 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Plays a once-off sound effect. Multiple sound effects can be played at the same time.
+ ///
[CommandInfo("Audio",
"Play Sound",
"Plays a once-off sound effect. Multiple sound effects can be played at the same time.")]
@@ -15,14 +15,14 @@ namespace Fungus
public class PlaySound : Command
{
[Tooltip("Sound effect clip to play")]
- public AudioClip soundClip;
+ [SerializeField] protected AudioClip soundClip;
[Range(0,1)]
[Tooltip("Volume level of the sound effect")]
- public float volume = 1;
+ [SerializeField] protected float volume = 1;
[Tooltip("Wait until the sound has finished playing before continuing execution.")]
- public bool waitUntilFinished;
+ [SerializeField] protected bool waitUntilFinished;
public override void OnEnter()
{
@@ -68,5 +68,4 @@ namespace Fungus
return new Color32(242, 209, 176, 255);
}
}
-
}
diff --git a/Assets/Fungus/Audio/Scripts/Commands/PlayUsfxrSound.cs b/Assets/Fungus/Audio/Scripts/Commands/PlayUsfxrSound.cs
index be6259ec..b6802fb8 100644
--- a/Assets/Fungus/Audio/Scripts/Commands/PlayUsfxrSound.cs
+++ b/Assets/Fungus/Audio/Scripts/Commands/PlayUsfxrSound.cs
@@ -1,13 +1,15 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
-namespace Fungus {
- using System;
- using UnityEngine;
- using UnityEngine.Serialization;
+using System;
+using UnityEngine;
+using UnityEngine.Serialization;
+namespace Fungus
+{
+ ///
+ /// Plays a usfxr synth sound. Use the usfxr editor [Tools > Fungus > Utilities > Generate usfxr Sound Effects] to create the SettingsString. Set a ParentTransform if using positional sound. See https://github.com/zeh/usfxr for more information about usfxr.
+ ///
[CommandInfo("Audio",
"Play Usfxr Sound",
"Plays a usfxr synth sound. Use the usfxr editor [Tools > Fungus > Utilities > Generate usfxr Sound Effects] to create the SettingsString. Set a ParentTransform if using positional sound. See https://github.com/zeh/usfxr for more information about usfxr.")]
@@ -15,31 +17,35 @@
[ExecuteInEditMode]
public class PlayUsfxrSound : Command
{
- protected SfxrSynth _synth = new SfxrSynth();
-
[Tooltip("Transform to use for positional audio")]
- public Transform ParentTransform = null;
+ [SerializeField] protected Transform ParentTransform = null;
[Tooltip("Settings string which describes the audio")]
- public StringDataMulti _SettingsString = new StringDataMulti("");
+ [SerializeField] protected StringDataMulti _SettingsString = new StringDataMulti("");
[Tooltip("Time to wait before executing the next command")]
- public float waitDuration = 0;
+ [SerializeField] protected float waitDuration = 0;
+
+ protected SfxrSynth _synth = new SfxrSynth();
//Call this if the settings have changed
- protected void UpdateCache() {
- if (_SettingsString.Value != null) {
+ protected void UpdateCache()
+ {
+ if (_SettingsString.Value != null)
+ {
_synth.parameters.SetSettingsString(_SettingsString.Value);
_synth.CacheSound();
}
}
- public void Awake() {
+ public void Awake()
+ {
//Always build the cache on awake
UpdateCache();
}
- public override void OnEnter() {
+ public override void OnEnter()
+ {
_synth.SetParentTransform(ParentTransform);
_synth.Play();
if (waitDuration == 0f)
@@ -57,17 +63,21 @@
Continue();
}
- public override string GetSummary() {
- if (String.IsNullOrEmpty(_SettingsString.Value)) {
+ public override string GetSummary()
+ {
+ if (String.IsNullOrEmpty(_SettingsString.Value))
+ {
return "Settings String hasn't been set!";
}
- if (ParentTransform != null) {
+ if (ParentTransform != null)
+ {
return "" + ParentTransform.name + ": " + _SettingsString.Value;
}
return "Camera.main: " + _SettingsString.Value;
}
- public override Color GetButtonColor() {
+ public override Color GetButtonColor()
+ {
return new Color32(128, 200, 200, 255);
}
diff --git a/Assets/Fungus/Audio/Scripts/Commands/SetAudioPitch.cs b/Assets/Fungus/Audio/Scripts/Commands/SetAudioPitch.cs
index c565ea7c..3bec0305 100644
--- a/Assets/Fungus/Audio/Scripts/Commands/SetAudioPitch.cs
+++ b/Assets/Fungus/Audio/Scripts/Commands/SetAudioPitch.cs
@@ -1,13 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Sets the global pitch level for audio played with Play Music and Play Sound commands.
+ ///
[CommandInfo("Audio",
"Set Audio Pitch",
"Sets the global pitch level for audio played with Play Music and Play Sound commands.")]
@@ -16,14 +16,14 @@ namespace Fungus
{
[Range(0,1)]
[Tooltip("Global pitch level for audio played using the Play Music and Play Sound commands")]
- public float pitch = 1;
+ [SerializeField] protected float pitch = 1;
[Range(0,30)]
[Tooltip("Time to fade between current pitch level and target pitch level.")]
- public float fadeDuration;
+ [SerializeField] protected float fadeDuration;
[Tooltip("Wait until the pitch change has finished before executing next command")]
- public bool waitUntilFinished = true;
+ [SerializeField] protected bool waitUntilFinished = true;
public override void OnEnter()
{
@@ -56,5 +56,4 @@ namespace Fungus
return new Color32(242, 209, 176, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Audio/Scripts/Commands/SetAudioVolume.cs b/Assets/Fungus/Audio/Scripts/Commands/SetAudioVolume.cs
index ab90d8c5..8297c1c0 100644
--- a/Assets/Fungus/Audio/Scripts/Commands/SetAudioVolume.cs
+++ b/Assets/Fungus/Audio/Scripts/Commands/SetAudioVolume.cs
@@ -1,13 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Sets the global volume level for audio played with Play Music and Play Sound commands.
+ ///
[CommandInfo("Audio",
"Set Audio Volume",
"Sets the global volume level for audio played with Play Music and Play Sound commands.")]
@@ -16,14 +16,14 @@ namespace Fungus
{
[Range(0,1)]
[Tooltip("Global volume level for audio played using Play Music and Play Sound")]
- public float volume = 1f;
+ [SerializeField] protected float volume = 1f;
[Range(0,30)]
[Tooltip("Time to fade between current volume level and target volume level.")]
- public float fadeDuration = 1f;
+ [SerializeField] protected float fadeDuration = 1f;
[Tooltip("Wait until the volume fade has completed before continuing.")]
- public bool waitUntilFinished = true;
+ [SerializeField] protected bool waitUntilFinished = true;
public override void OnEnter()
{
@@ -54,5 +54,4 @@ namespace Fungus
return new Color32(242, 209, 176, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Audio/Scripts/Commands/StopMusic.cs b/Assets/Fungus/Audio/Scripts/Commands/StopMusic.cs
index c1beb15f..dd7728c8 100644
--- a/Assets/Fungus/Audio/Scripts/Commands/StopMusic.cs
+++ b/Assets/Fungus/Audio/Scripts/Commands/StopMusic.cs
@@ -1,13 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Stops the currently playing game music.
+ ///
[CommandInfo("Audio",
"Stop Music",
"Stops the currently playing game music.")]
@@ -30,5 +30,4 @@ namespace Fungus
return new Color32(242, 209, 176, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Audio/Scripts/MusicController.cs b/Assets/Fungus/Audio/Scripts/MusicController.cs
index 628842d3..32777103 100644
--- a/Assets/Fungus/Audio/Scripts/MusicController.cs
+++ b/Assets/Fungus/Audio/Scripts/MusicController.cs
@@ -1,27 +1,22 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
- /**
- * Singleton music manager component.
- * Provides basic music and sound effect functionality.
- * Music playback persists across scene loads.
- */
+ ///
+ /// Singleton music manager component.
+ /// Provides basic music and sound effect functionality.
+ /// Music playback persists across scene loads.
+ ///
[RequireComponent(typeof(AudioSource))]
public class MusicController : MonoBehaviour
{
static MusicController instance;
- /**
- * Returns the MusicController singleton instance.
- * Will create a MusicController game object if none currently exists.
- */
+ // Returns the MusicController singleton instance.
+ // Will create a MusicController game object if none currently exists.
static public MusicController GetInstance()
{
if (instance == null)
@@ -40,12 +35,10 @@ namespace Fungus
GetComponent().loop = true;
}
- /**
- * Plays game music using an audio clip.
- * One music clip may be played at a time.
- * @param musicClip The music clip to play
- * @param atTime Time in the music clip to start at
- */
+ ///
+ /// // Plays game music using an audio clip.
+ /// One music clip may be played at a time.
+ ///
public void PlayMusic(AudioClip musicClip, bool loop, float fadeDuration, float atTime)
{
AudioSource audioSource = GetComponent();
@@ -79,21 +72,21 @@ namespace Fungus
});
}
}
-
- /**
- * Stops playing game music.
- */
+
+ ///
+ /// Stops playing game music.
+ ///
public virtual void StopMusic()
{
GetComponent().Stop();
}
- /**
- * Fades the game music volume to required level over a period of time.
- * @param volume The new music volume value [0..1]
- * @param duration The length of time in seconds needed to complete the volume change.
- * @param onComplete Delegate function to call when fade completes.
- */
+ ///
+ /// Fades the game music volume to required level over a period of time.
+ ///
+ /// The new music volume value [0..1]
+ /// The length of time in seconds needed to complete the volume change.
+ /// Delegate function to call when fade completes.
public virtual void SetAudioVolume(float volume, float duration, System.Action onComplete)
{
AudioSource audio = GetComponent();
@@ -117,12 +110,12 @@ namespace Fungus
});
}
- /**
- * Shifts the game music pitch to required value over a period of time.
- * @param volume The new music pitch value
- * @param duration The length of time in seconds needed to complete the pitch change.
- * @param onComplete A delegate method to call when the pitch shift has completed.
- */
+ ///
+ /// Shifts the game music pitch to required value over a period of time.
+ ///
+ /// The new music pitch value.
+ /// The length of time in seconds needed to complete the pitch change.
+ /// A delegate method to call when the pitch shift has completed.
public virtual void SetAudioPitch(float pitch, float duration, System.Action onComplete)
{
AudioSource audio = GetComponent();
@@ -150,12 +143,11 @@ namespace Fungus
});
}
- /**
- * Plays a sound effect once, at the specified volume.
- * Multiple sound effects can be played at the same time.
- * @param soundClip The sound effect clip to play
- * @param volume The volume level of the sound effect
- */
+ ///
+ /// Plays a sound effect once, at the specified volume.
+ ///
+ /// The sound effect clip to play.
+ /// The volume level of the sound effect.
public virtual void PlaySound(AudioClip soundClip, float volume)
{
GetComponent().PlayOneShot(soundClip, volume);
diff --git a/Assets/Fungus/Camera/Editor/CameraMenuItems.cs b/Assets/Fungus/Camera/Editor/CameraMenuItems.cs
index d2632259..1ecb421b 100644
--- a/Assets/Fungus/Camera/Editor/CameraMenuItems.cs
+++ b/Assets/Fungus/Camera/Editor/CameraMenuItems.cs
@@ -1,15 +1,11 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEditor;
-using System.Collections;
namespace Fungus
{
-
public class CameraMenuItems
{
[MenuItem("Tools/Fungus/Create/View", false, 100)]
@@ -18,5 +14,4 @@ namespace Fungus
FlowchartMenuItems.SpawnPrefab("View");
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Camera/Editor/ViewEditor.cs b/Assets/Fungus/Camera/Editor/ViewEditor.cs
index 6a5c8e4e..9ebcbadd 100644
--- a/Assets/Fungus/Camera/Editor/ViewEditor.cs
+++ b/Assets/Fungus/Camera/Editor/ViewEditor.cs
@@ -1,16 +1,11 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
-
[CanEditMultipleObjects]
[CustomEditor (typeof(View))]
public class ViewEditor : Editor
@@ -154,7 +149,7 @@ namespace Fungus
if (newPos != handles[i])
{
Undo.RecordObject(view, "Set View Size");
- view.viewSize = (newPos - pos).magnitude;
+ view.ViewSize = (newPos - pos).magnitude;
EditorUtility.SetDirty(view);
break;
}
@@ -164,8 +159,8 @@ namespace Fungus
public static void DrawView(View view, bool drawInterior)
{
float height = CalculateLocalViewSize(view);
- float widthA = height * (view.primaryAspectRatio.x / view.primaryAspectRatio.y);
- float widthB = height * (view.secondaryAspectRatio.x / view.secondaryAspectRatio.y);
+ float widthA = height * (view.PrimaryAspectRatio.x / view.PrimaryAspectRatio.y);
+ float widthB = height * (view.SecondaryAspectRatio.x / view.SecondaryAspectRatio.y);
Color transparent = new Color(1,1,1,0f);
Color fill = viewColor;
@@ -176,11 +171,11 @@ namespace Fungus
Flowchart flowchart = FlowchartWindow.GetFlowchart();
if (flowchart != null)
{
- foreach (Command command in flowchart.selectedCommands)
+ foreach (Command command in flowchart.SelectedCommands)
{
MoveToView moveToViewCommand = command as MoveToView;
if (moveToViewCommand != null &&
- moveToViewCommand.targetView == view)
+ moveToViewCommand.TargetView == view)
{
highlight = true;
}
@@ -188,7 +183,7 @@ namespace Fungus
{
FadeToView fadeToViewCommand = command as FadeToView;
if (fadeToViewCommand != null &&
- fadeToViewCommand.targetView == view)
+ fadeToViewCommand.TargetView == view)
{
highlight = true;
}
@@ -260,8 +255,7 @@ namespace Fungus
// Kinda expensive, but accurate and only called in editor.
static float CalculateLocalViewSize(View view)
{
- return view.transform.InverseTransformPoint(view.transform.position + new Vector3(0, view.viewSize, 0)).magnitude;
+ return view.transform.InverseTransformPoint(view.transform.position + new Vector3(0, view.ViewSize, 0)).magnitude;
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Camera/Scripts/CameraController.cs b/Assets/Fungus/Camera/Scripts/CameraController.cs
index 661658df..61d938f9 100644
--- a/Assets/Fungus/Camera/Scripts/CameraController.cs
+++ b/Assets/Fungus/Camera/Scripts/CameraController.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System;
@@ -11,50 +9,36 @@ using Fungus;
namespace Fungus
{
- /**
- * Controller for main camera.
- * Supports several types of camera transition including snap, pan & fade.
- */
+ ///
+ /// Controller for main camera.Supports several types of camera transition including snap, pan & fade.
+ ///
public class CameraController : MonoBehaviour
{
- /**
- * Full screen texture used for screen fade effect.
- */
- public Texture2D screenFadeTexture;
-
- /**
- * Icon to display when swipe pan mode is active.
- */
- public Texture2D swipePanIcon;
-
- /**
- * Position of continue and swipe icons in normalized screen space coords.
- * (0,0) = top left, (1,1) = bottom right
- */
- public Vector2 swipeIconPosition = new Vector2(1,0);
-
- /**
- * Set the camera z coordinate to a fixed value every frame.
- */
- public bool setCameraZ = true;
-
- /**
- * Fixed Z coordinate of main camera.
- */
- public float cameraZ = -10f;
-
- [HideInInspector]
- public bool waiting;
-
+ [Tooltip("Full screen texture used for screen fade effect.")]
+ [SerializeField] protected Texture2D screenFadeTexture;
+ public Texture2D ScreenFadeTexture { set { screenFadeTexture = value; } }
+
+ [Tooltip("Icon to display when swipe pan mode is active.")]
+ [SerializeField] protected Texture2D swipePanIcon;
+
+ [Tooltip("Position of continue and swipe icons in normalized screen space coords. (0,0) = top left, (1,1) = bottom right")]
+ [SerializeField] protected Vector2 swipeIconPosition = new Vector2(1,0);
+
+ [Tooltip("Set the camera z coordinate to a fixed value every frame.")]
+ [SerializeField] protected bool setCameraZ = true;
+
+ [Tooltip("Fixed Z coordinate of main camera.")]
+ [SerializeField] protected float cameraZ = -10f;
+
+ [Tooltip("Camera to use when in swipe mode")]
+ [SerializeField] protected Camera swipeCamera;
+
protected float fadeAlpha = 0f;
// Swipe panning control
- [HideInInspector]
- public bool swipePanActive;
- public Camera swipeCamera;
+ protected bool swipePanActive;
- [HideInInspector]
- public float swipeSpeedMultiplier = 1f;
+ protected float swipeSpeedMultiplier = 1f;
protected View swipePanViewA;
protected View swipePanViewB;
protected Vector3 previousMousePos;
@@ -70,10 +54,10 @@ namespace Fungus
protected static CameraController instance;
- /**
- * Returns the CameraController singleton instance.
- * Will create a CameraController game object if none currently exists.
- */
+ ///
+ /// Returns the CameraController singleton instance.
+ /// Will create a CameraController game object if none currently exists.
+ ///
static public CameraController GetInstance()
{
if (instance == null)
@@ -132,18 +116,18 @@ namespace Fungus
GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), screenFadeTexture);
}
}
-
- /**
- * Perform a fullscreen fade over a duration.
- */
+
+ ///
+ /// Perform a fullscreen fade over a duration.
+ ///
public virtual void Fade(float targetAlpha, float fadeDuration, Action fadeAction)
{
StartCoroutine(FadeInternal(targetAlpha, fadeDuration, fadeAction));
}
-
- /**
- * Fade out, move camera to view and then fade back in.
- */
+
+ ///
+ /// Fade out, move camera to view and then fade back in.
+ ///
public virtual void FadeToView(Camera camera, View view, float fadeDuration, bool fadeOut, Action fadeAction)
{
swipePanActive = false;
@@ -167,7 +151,7 @@ namespace Fungus
Fade(1f, outDuration, delegate {
// Snap to new view
- PanToPosition(camera, view.transform.position, view.transform.rotation, view.viewSize, 0f, null);
+ PanToPosition(camera, view.transform.position, view.transform.rotation, view.ViewSize, 0f, null);
// Fade in
Fade(0f, inDuration, delegate {
@@ -210,11 +194,10 @@ namespace Fungus
fadeAction();
}
}
-
- /**
- * Positions camera so sprite is centered and fills the screen.
- * @param spriteRenderer The sprite to center the camera on
- */
+
+ ///
+ /// Positions camera so sprite is centered and fills the screen.
+ ///
public virtual void CenterOnSprite(Camera camera, SpriteRenderer spriteRenderer)
{
if (camera == null)
@@ -244,12 +227,12 @@ namespace Fungus
public virtual void PanToView(Camera camera, View view, float duration, Action arriveAction)
{
- PanToPosition(camera, view.transform.position, view.transform.rotation, view.viewSize, duration, arriveAction);
+ PanToPosition(camera, view.transform.position, view.transform.rotation, view.ViewSize, duration, arriveAction);
}
-
- /**
- * Moves camera from current position to a target position over a period of time.
- */
+
+ ///
+ /// Moves camera from current position to a target position over a period of time.
+ ///
public virtual void PanToPosition(Camera camera, Vector3 targetPosition, Quaternion targetRotation, float targetSize, float duration, Action arriveAction)
{
if (camera == null)
@@ -282,10 +265,10 @@ namespace Fungus
StartCoroutine(PanInternal(camera, targetPosition, targetRotation, targetSize, duration, arriveAction));
}
}
-
- /**
- * Stores the current camera view using a name.
- */
+
+ ///
+ /// Stores the current camera view using a name.
+ ///
public virtual void StoreView(Camera camera, string viewName)
{
if (camera != null)
@@ -300,10 +283,10 @@ namespace Fungus
currentView.cameraSize = camera.orthographicSize;
storedViews[viewName] = currentView;
}
-
- /**
- * Moves the camera to a previously stored camera view over a period of time.
- */
+
+ ///
+ /// Moves the camera to a previously stored camera view over a period of time.
+ ///
public virtual void PanToStoredView(Camera camera, string viewName, float duration, Action arriveAction)
{
if (camera == null)
@@ -395,10 +378,10 @@ namespace Fungus
yield return null;
}
}
-
- /**
- * Moves camera smoothly through a sequence of Views over a period of time
- */
+
+ ///
+ /// Moves camera smoothly through a sequence of Views over a period of time.
+ ///
public virtual void PanToPath(Camera camera, View[] viewList, float duration, Action arriveAction)
{
if (camera == null)
@@ -424,7 +407,7 @@ namespace Fungus
Vector3 viewPos = new Vector3(view.transform.position.x,
view.transform.position.y,
- view.viewSize);
+ view.ViewSize);
pathList.Add(viewPos);
}
@@ -462,11 +445,10 @@ namespace Fungus
arriveAction();
}
}
-
- /**
- * Activates swipe panning mode.
- * The player can pan the camera within the area between viewA & viewB.
- */
+
+ ///
+ /// Activates swipe panning mode. The player can pan the camera within the area between viewA & viewB.
+ ///
public virtual void StartSwipePan(Camera camera, View viewA, View viewB, float duration, float speedMultiplier, Action arriveAction)
{
if (camera == null)
@@ -495,10 +477,10 @@ namespace Fungus
}
});
}
-
- /**
- * Deactivates swipe panning mode.
- */
+
+ ///
+ /// Deactivates swipe panning mode.
+ ///
public virtual void StopSwipePan()
{
swipePanActive = false;
@@ -599,7 +581,7 @@ namespace Fungus
float t = Vector3.Dot(toViewB, localPos);
t = Mathf.Clamp01(t); // Not really necessary but no harm
- float cameraSize = Mathf.Lerp(viewA.viewSize, viewB.viewSize, t);
+ float cameraSize = Mathf.Lerp(viewA.ViewSize, viewB.ViewSize, t);
return cameraSize;
}
diff --git a/Assets/Fungus/Camera/Scripts/Commands/FadeScreen.cs b/Assets/Fungus/Camera/Scripts/Commands/FadeScreen.cs
index 5acc9a5b..8bd99102 100644
--- a/Assets/Fungus/Camera/Scripts/Commands/FadeScreen.cs
+++ b/Assets/Fungus/Camera/Scripts/Commands/FadeScreen.cs
@@ -1,14 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Draws a fullscreen texture over the scene to give a fade effect. Setting Target Alpha to 1 will obscure the screen, alpha 0 will reveal the screen.
+ /// If no Fade Texture is provided then a default flat color texture is used.
+ ///
[CommandInfo("Camera",
"Fade Screen",
"Draws a fullscreen texture over the scene to give a fade effect. Setting Target Alpha to 1 will obscure the screen, alpha 0 will reveal the screen. " +
@@ -17,42 +17,36 @@ namespace Fungus
public class FadeScreen : Command
{
[Tooltip("Time for fade effect to complete")]
- public float duration = 1f;
+ [SerializeField] protected float duration = 1f;
[Tooltip("Current target alpha transparency value. The fade gradually adjusts the alpha to approach this target value.")]
- public float targetAlpha = 1f;
+ [SerializeField] protected float targetAlpha = 1f;
[Tooltip("Wait until the fade has finished before executing next command")]
- public bool waitUntilFinished = true;
+ [SerializeField] protected bool waitUntilFinished = true;
[Tooltip("Color to render fullscreen fade texture with when screen is obscured.")]
- public Color fadeColor = Color.black;
+ [SerializeField] protected Color fadeColor = Color.black;
[Tooltip("Optional texture to use when rendering the fullscreen fade effect.")]
- public Texture2D fadeTexture;
+ [SerializeField] protected Texture2D fadeTexture;
public override void OnEnter()
{
CameraController cameraController = CameraController.GetInstance();
- if (waitUntilFinished)
- {
- cameraController.waiting = true;
- }
-
if (fadeTexture)
{
- cameraController.screenFadeTexture = fadeTexture;
+ cameraController.ScreenFadeTexture = fadeTexture;
}
else
{
- cameraController.screenFadeTexture = CameraController.CreateColorTexture(fadeColor, 32, 32);
+ cameraController.ScreenFadeTexture = CameraController.CreateColorTexture(fadeColor, 32, 32);
}
cameraController.Fade(targetAlpha, duration, delegate {
if (waitUntilFinished)
{
- cameraController.waiting = false;
Continue();
}
});
@@ -72,6 +66,5 @@ namespace Fungus
{
return new Color32(216, 228, 170, 255);
}
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/Camera/Scripts/Commands/FadeToView.cs b/Assets/Fungus/Camera/Scripts/Commands/FadeToView.cs
index da7a2677..ed0d97bb 100644
--- a/Assets/Fungus/Camera/Scripts/Commands/FadeToView.cs
+++ b/Assets/Fungus/Camera/Scripts/Commands/FadeToView.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Fades the camera out and in again at a position specified by a View object.
+ ///
[CommandInfo("Camera",
"Fade To View",
"Fades the camera out and in again at a position specified by a View object.")]
@@ -16,25 +15,26 @@ namespace Fungus
public class FadeToView : Command
{
[Tooltip("Time for fade effect to complete")]
- public float duration = 1f;
+ [SerializeField] protected float duration = 1f;
[Tooltip("Fade from fully visible to opaque at start of fade")]
- public bool fadeOut = true;
+ [SerializeField] protected bool fadeOut = true;
[Tooltip("View to transition to when Fade is complete")]
- public View targetView;
+ [SerializeField] protected View targetView;
+ public View TargetView { get { return targetView; } }
[Tooltip("Wait until the fade has finished before executing next command")]
- public bool waitUntilFinished = true;
+ [SerializeField] protected bool waitUntilFinished = true;
[Tooltip("Color to render fullscreen fade texture with when screen is obscured.")]
- public Color fadeColor = Color.black;
+ [SerializeField] protected Color fadeColor = Color.black;
[Tooltip("Optional texture to use when rendering the fullscreen fade effect.")]
- public Texture2D fadeTexture;
+ [SerializeField] protected Texture2D fadeTexture;
[Tooltip("Camera to use for the fade. Will use main camera if set to none.")]
- public Camera targetCamera;
+ [SerializeField] protected Camera targetCamera;
protected virtual void AcquireCamera()
{
@@ -67,24 +67,18 @@ namespace Fungus
CameraController cameraController = CameraController.GetInstance();
- if (waitUntilFinished)
- {
- cameraController.waiting = true;
- }
-
if (fadeTexture)
{
- cameraController.screenFadeTexture = fadeTexture;
+ cameraController.ScreenFadeTexture = fadeTexture;
}
else
{
- cameraController.screenFadeTexture = CameraController.CreateColorTexture(fadeColor, 32, 32);
+ cameraController.ScreenFadeTexture = CameraController.CreateColorTexture(fadeColor, 32, 32);
}
cameraController.FadeToView(targetCamera, targetView, duration, fadeOut, delegate {
if (waitUntilFinished)
{
- cameraController.waiting = false;
Continue();
}
});
@@ -117,5 +111,4 @@ namespace Fungus
return new Color32(216, 228, 170, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Camera/Scripts/Commands/Fullscreen.cs b/Assets/Fungus/Camera/Scripts/Commands/Fullscreen.cs
index bb0eb781..fd299faf 100644
--- a/Assets/Fungus/Camera/Scripts/Commands/Fullscreen.cs
+++ b/Assets/Fungus/Camera/Scripts/Commands/Fullscreen.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Sets the application to fullscreen, windowed or toggles the current state.
+ ///
[CommandInfo("Camera",
"Fullscreen",
"Sets the application to fullscreen, windowed or toggles the current state.")]
@@ -22,7 +21,7 @@ namespace Fungus
Windowed
}
- public FullscreenMode fullscreenMode;
+ [SerializeField] protected FullscreenMode fullscreenMode;
public override void OnEnter()
{
@@ -52,5 +51,4 @@ namespace Fungus
return new Color32(216, 228, 170, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Camera/Scripts/Commands/MoveToView.cs b/Assets/Fungus/Camera/Scripts/Commands/MoveToView.cs
index e8085121..85a47526 100644
--- a/Assets/Fungus/Camera/Scripts/Commands/MoveToView.cs
+++ b/Assets/Fungus/Camera/Scripts/Commands/MoveToView.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Moves the camera to a location specified by a View object.
+ ///
[CommandInfo("Camera",
"Move To View",
"Moves the camera to a location specified by a View object.")]
@@ -16,16 +15,17 @@ namespace Fungus
public class MoveToView : Command
{
[Tooltip("Time for move effect to complete")]
- public float duration = 1;
+ [SerializeField] protected float duration = 1;
[Tooltip("View to transition to when move is complete")]
- public Fungus.View targetView;
+ [SerializeField] protected View targetView;
+ public View TargetView { get { return targetView; } }
[Tooltip("Wait until the fade has finished before executing next command")]
- public bool waitUntilFinished = true;
+ [SerializeField] protected bool waitUntilFinished = true;
[Tooltip("Camera to use for the pan. Will use main camera if set to none.")]
- public Camera targetCamera;
+ [SerializeField] protected Camera targetCamera;
protected virtual void AcquireCamera()
{
@@ -58,19 +58,13 @@ namespace Fungus
CameraController cameraController = CameraController.GetInstance();
- if (waitUntilFinished)
- {
- cameraController.waiting = true;
- }
-
Vector3 targetPosition = targetView.transform.position;
Quaternion targetRotation = targetView.transform.rotation;
- float targetSize = targetView.viewSize;
+ float targetSize = targetView.ViewSize;
cameraController.PanToPosition(targetCamera, targetPosition, targetRotation, targetSize, duration, delegate {
if (waitUntilFinished)
{
- cameraController.waiting = false;
Continue();
}
});
@@ -103,5 +97,4 @@ namespace Fungus
return new Color32(216, 228, 170, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Camera/Scripts/Commands/ShakeCamera.cs b/Assets/Fungus/Camera/Scripts/Commands/ShakeCamera.cs
index 3e33ca57..f45b44be 100644
--- a/Assets/Fungus/Camera/Scripts/Commands/ShakeCamera.cs
+++ b/Assets/Fungus/Camera/Scripts/Commands/ShakeCamera.cs
@@ -1,14 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
using System.Collections;
namespace Fungus
{
+ ///
+ /// Applies a camera shake effect to the main camera.
+ ///
[CommandInfo("Camera",
"Shake Camera",
"Applies a camera shake effect to the main camera.")]
@@ -16,13 +16,13 @@ namespace Fungus
public class ShakeCamera : Command
{
[Tooltip("Time for camera shake effect to complete")]
- public float duration = 0.5f;
+ [SerializeField] protected float duration = 0.5f;
[Tooltip("Magnitude of shake effect in x & y axes")]
- public Vector2 amount = new Vector2(1, 1);
+ [SerializeField] protected Vector2 amount = new Vector2(1, 1);
[Tooltip("Wait until the shake effect has finished before executing next command")]
- public bool waitUntilFinished;
+ [SerializeField] protected bool waitUntilFinished;
public override void OnEnter()
{
@@ -64,6 +64,5 @@ namespace Fungus
{
return new Color32(216, 228, 170, 255);
}
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/Camera/Scripts/Commands/StartSwipe.cs b/Assets/Fungus/Camera/Scripts/Commands/StartSwipe.cs
index d4629578..e7fea394 100644
--- a/Assets/Fungus/Camera/Scripts/Commands/StartSwipe.cs
+++ b/Assets/Fungus/Camera/Scripts/Commands/StartSwipe.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Activates swipe panning mode where the player can pan the camera within the area between viewA & viewB.
+ ///
[CommandInfo("Camera",
"Start Swipe",
"Activates swipe panning mode where the player can pan the camera within the area between viewA & viewB.")]
@@ -16,19 +15,19 @@ namespace Fungus
public class StartSwipe : Command
{
[Tooltip("Defines one extreme of the scrollable area that the player can pan around")]
- public View viewA;
+ [SerializeField] protected View viewA;
[Tooltip("Defines one extreme of the scrollable area that the player can pan around")]
- public View viewB;
+ [SerializeField] protected View viewB;
[Tooltip("Time to move the camera to a valid starting position between the two views")]
- public float duration = 0.5f;
+ [SerializeField] protected float duration = 0.5f;
[Tooltip("Multiplier factor for speed of swipe pan")]
- public float speedMultiplier = 1f;
+ [SerializeField] protected float speedMultiplier = 1f;
[Tooltip("Camera to use for the pan. Will use main camera if set to none.")]
- public Camera targetCamera;
+ [SerializeField] protected Camera targetCamera;
public virtual void Start()
{
@@ -77,5 +76,4 @@ namespace Fungus
return new Color32(216, 228, 170, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Camera/Scripts/Commands/StopSwipe.cs b/Assets/Fungus/Camera/Scripts/Commands/StopSwipe.cs
index 75748d26..0551d3bf 100644
--- a/Assets/Fungus/Camera/Scripts/Commands/StopSwipe.cs
+++ b/Assets/Fungus/Camera/Scripts/Commands/StopSwipe.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Deactivates swipe panning mode.
+ ///
[CommandInfo("Camera",
"Stop Swipe",
"Deactivates swipe panning mode.")]
@@ -29,5 +28,4 @@ namespace Fungus
return new Color32(216, 228, 170, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Camera/Scripts/View.cs b/Assets/Fungus/Camera/Scripts/View.cs
index b466dd13..7f756f16 100644
--- a/Assets/Fungus/Camera/Scripts/View.cs
+++ b/Assets/Fungus/Camera/Scripts/View.cs
@@ -1,40 +1,37 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
- /**
- * Defines a camera view point.
- * The position and rotation are specified using the game object's transform, so this class
- * only needs to specify the ortographic view size.
- */
+ ///
+ /// Defines a camera view point.
+ /// The position and rotation are specified using the game object's transform, so this class only needs to specify the ortographic view size.
+ ///
[ExecuteInEditMode]
public class View : MonoBehaviour
{
- /**
- * Orthographic size of the camera view in world units.
- */
+ ///
+ /// Orthographic size of the camera view in world units.
+ ///
[Tooltip("Orthographic size of the camera view in world units.")]
- public float viewSize = 0.5f;
+ [SerializeField] protected float viewSize = 0.5f;
+ public float ViewSize { get { return viewSize; } set { viewSize = value; } }
- /**
- * Aspect ratio of the primary view rectangle.
- * e.g. a 4:3 aspect ratio = 1.333
- */
+ ///
+ /// Aspect ratio of the primary view rectangle. e.g. a 4:3 aspect ratio = 1.333.
+ ///
[Tooltip("Aspect ratio of the primary view rectangle. (e.g. 4:3 aspect ratio = 1.333)")]
- public Vector2 primaryAspectRatio = new Vector2(4, 3);
+ [SerializeField] protected Vector2 primaryAspectRatio = new Vector2(4, 3);
+ public Vector2 PrimaryAspectRatio { get { return primaryAspectRatio; } set { primaryAspectRatio = value; } }
- /**
- * Aspect ratio of the secondary view rectangle.
- * e.g. a 2:1 aspect ratio = 2/1 = 2.0
- */
+ ///
+ /// Aspect ratio of the secondary view rectangle. e.g. a 2:1 aspect ratio = 2/1 = 2.0.
+ ///
[Tooltip("Aspect ratio of the secondary view rectangle. (e.g. 2:1 aspect ratio = 2.0)")]
- public Vector2 secondaryAspectRatio = new Vector2(2, 1);
+ [SerializeField] protected Vector2 secondaryAspectRatio = new Vector2(2, 1);
+ public Vector2 SecondaryAspectRatio { get { return secondaryAspectRatio; } set { secondaryAspectRatio = value; } }
protected virtual void Update()
{
diff --git a/Assets/Fungus/Flowchart/Editor/AssetModProcessor.cs b/Assets/Fungus/Flowchart/Editor/AssetModProcessor.cs
index 83854bef..a00795a7 100644
--- a/Assets/Fungus/Flowchart/Editor/AssetModProcessor.cs
+++ b/Assets/Fungus/Flowchart/Editor/AssetModProcessor.cs
@@ -1,20 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
-using UnityEngine;
-using UnityEditor;
-using System;
using System.IO;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
- /**
- * Prevents saving of selected blocks and commands to avoid version control conflicts
- */
+ ///
+ /// Prevents saving of selected blocks and commands to avoid version control conflicts.
+ ///
public class AssetModProcessor : UnityEditor.AssetModificationProcessor
{
public static string[] OnWillSaveAssets(string[] paths)
@@ -38,15 +31,14 @@ namespace Fungus
Flowchart[] flowcharts = UnityEngine.Object.FindObjectsOfType();
foreach (Flowchart f in flowcharts)
{
- if (!f.saveSelection)
+ if (!f.SaveSelection)
{
- f.selectedBlock = null;
+ f.SelectedBlock = null;
f.ClearSelectedCommands();
}
}
return paths;
}
-
}
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Editor/BlockEditor.cs b/Assets/Fungus/Flowchart/Editor/BlockEditor.cs
index 0e5c1937..9a84341b 100644
--- a/Assets/Fungus/Flowchart/Editor/BlockEditor.cs
+++ b/Assets/Fungus/Flowchart/Editor/BlockEditor.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
using UnityEditorInternal;
@@ -17,7 +15,6 @@ using System.Reflection;
namespace Fungus
{
-
[CustomEditor (typeof(Block))]
public class BlockEditor : Editor
{
@@ -64,7 +61,7 @@ namespace Fungus
// Ensure block name is unique for this Flowchart
Block block = target as Block;
string uniqueName = flowchart.GetUniqueBlockKey(blockNameProperty.stringValue, block);
- if (uniqueName != block.blockName)
+ if (uniqueName != block.BlockName)
{
blockNameProperty.stringValue = uniqueName;
}
@@ -96,7 +93,7 @@ namespace Fungus
SerializedProperty commandListProperty = serializedObject.FindProperty("commandList");
- if (block == flowchart.selectedBlock)
+ if (block == flowchart.SelectedBlock)
{
SerializedProperty descriptionProp = serializedObject.FindProperty("description");
EditorGUILayout.PropertyField(descriptionProp);
@@ -106,22 +103,22 @@ namespace Fungus
block.UpdateIndentLevels();
// Make sure each command has a reference to its parent block
- foreach (Command command in block.commandList)
+ foreach (Command command in block.CommandList)
{
if (command == null) // Will be deleted from the list later on
{
continue;
}
- command.parentBlock = block;
+ command.ParentBlock = block;
}
ReorderableListGUI.Title("Commands");
CommandListAdaptor adaptor = new CommandListAdaptor(commandListProperty, 0);
- adaptor.nodeRect = block.nodeRect;
+ adaptor.nodeRect = block._NodeRect;
ReorderableListFlags flags = ReorderableListFlags.HideAddButton | ReorderableListFlags.HideRemoveButtons | ReorderableListFlags.DisableContextMenu;
- if (block.commandList.Count == 0)
+ if (block.CommandList.Count == 0)
{
EditorGUILayout.HelpBox("Press the + button below to add a command to the list.", MessageType.Info);
}
@@ -146,7 +143,7 @@ namespace Fungus
// Copy keyboard shortcut
if (e.type == EventType.ValidateCommand && e.commandName == "Copy")
{
- if (flowchart.selectedCommands.Count > 0)
+ if (flowchart.SelectedCommands.Count > 0)
{
e.Use();
}
@@ -161,7 +158,7 @@ namespace Fungus
// Cut keyboard shortcut
if (e.type == EventType.ValidateCommand && e.commandName == "Cut")
{
- if (flowchart.selectedCommands.Count > 0)
+ if (flowchart.SelectedCommands.Count > 0)
{
e.Use();
}
@@ -192,7 +189,7 @@ namespace Fungus
// Duplicate keyboard shortcut
if (e.type == EventType.ValidateCommand && e.commandName == "Duplicate")
{
- if (flowchart.selectedCommands.Count > 0)
+ if (flowchart.SelectedCommands.Count > 0)
{
e.Use();
}
@@ -208,7 +205,7 @@ namespace Fungus
// Delete keyboard shortcut
if (e.type == EventType.ValidateCommand && e.commandName == "Delete")
{
- if (flowchart.selectedCommands.Count > 0)
+ if (flowchart.SelectedCommands.Count > 0)
{
e.Use();
}
@@ -232,7 +229,6 @@ namespace Fungus
e.Use();
}
}
-
}
// Remove any null entries in the command list.
@@ -311,9 +307,9 @@ namespace Fungus
Block block = target as Block;
System.Type currentType = null;
- if (block.eventHandler != null)
+ if (block._EventHandler != null)
{
- currentType = block.eventHandler.GetType();
+ currentType = block._EventHandler.GetType();
}
string currentHandlerName = "";
@@ -372,9 +368,9 @@ namespace Fungus
}
EditorGUILayout.EndHorizontal();
- if (block.eventHandler != null)
+ if (block._EventHandler != null)
{
- EventHandlerEditor eventHandlerEditor = Editor.CreateEditor(block.eventHandler) as EventHandlerEditor;
+ EventHandlerEditor eventHandlerEditor = Editor.CreateEditor(block._EventHandler) as EventHandlerEditor;
if (eventHandlerEditor != null)
{
eventHandlerEditor.DrawInspectorGUI();
@@ -395,16 +391,16 @@ namespace Fungus
Undo.RecordObject(block, "Set Event Handler");
- if (block.eventHandler != null)
+ if (block._EventHandler != null)
{
- Undo.DestroyObjectImmediate(block.eventHandler);
+ Undo.DestroyObjectImmediate(block._EventHandler);
}
if (selectedType != null)
{
EventHandler newHandler = Undo.AddComponent(block.gameObject, selectedType) as EventHandler;
- newHandler.parentBlock = block;
- block.eventHandler = newHandler;
+ newHandler.ParentBlock = block;
+ block._EventHandler = newHandler;
}
// Because this is an async call, we need to force prefab instances to record changes
@@ -428,7 +424,7 @@ namespace Fungus
Block[] blocks = flowchart.GetComponents();
for (int i = 0; i < blocks.Length; ++i)
{
- blockNames.Add(new GUIContent(blocks[i].blockName));
+ blockNames.Add(new GUIContent(blocks[i].BlockName));
if (block == blocks[i])
{
@@ -603,7 +599,7 @@ namespace Fungus
protected static string GetPropertyInfo(System.Type type)
{
string markdown = "";
- foreach(FieldInfo field in type.GetFields() )
+ foreach(FieldInfo field in type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic))
{
TooltipAttribute attribute = (TooltipAttribute)Attribute.GetCustomAttribute(field, typeof(TooltipAttribute));
if (attribute == null )
@@ -641,16 +637,16 @@ namespace Fungus
// Use index of last selected command in list, or end of list if nothing selected.
int index = -1;
- foreach (Command command in flowchart.selectedCommands)
+ foreach (Command command in flowchart.SelectedCommands)
{
- if (command.commandIndex + 1 > index)
+ if (command.CommandIndex + 1 > index)
{
- index = command.commandIndex + 1;
+ index = command.CommandIndex + 1;
}
}
if (index == -1)
{
- index = block.commandList.Count;
+ index = block.CommandList.Count;
}
GenericMenu commandMenu = new GenericMenu();
@@ -738,20 +734,20 @@ namespace Fungus
Command newCommand = Undo.AddComponent(block.gameObject, commandOperation.commandType) as Command;
block.GetFlowchart().AddSelectedCommand(newCommand);
- newCommand.parentBlock = block;
- newCommand.itemId = flowchart.NextItemId();
+ newCommand.ParentBlock = block;
+ newCommand.ItemId = flowchart.NextItemId();
// Let command know it has just been added to the block
newCommand.OnCommandAdded(block);
Undo.RecordObject(block, "Set command type");
- if (commandOperation.index < block.commandList.Count - 1)
+ if (commandOperation.index < block.CommandList.Count - 1)
{
- block.commandList.Insert(commandOperation.index, newCommand);
+ block.CommandList.Insert(commandOperation.index, newCommand);
}
else
{
- block.commandList.Add(newCommand);
+ block.CommandList.Add(newCommand);
}
// Because this is an async call, we need to force prefab instances to record changes
@@ -774,12 +770,12 @@ namespace Fungus
bool showPaste = false;
bool showPlay = false;
- if (flowchart.selectedCommands.Count > 0)
+ if (flowchart.SelectedCommands.Count > 0)
{
showCut = true;
showCopy = true;
showDelete = true;
- if (flowchart.selectedCommands.Count == 1 && Application.isPlaying)
+ if (flowchart.SelectedCommands.Count == 1 && Application.isPlaying)
{
showPlay = true;
}
@@ -852,14 +848,14 @@ namespace Fungus
Flowchart flowchart = block.GetFlowchart();
if (flowchart == null ||
- flowchart.selectedBlock == null)
+ flowchart.SelectedBlock == null)
{
return;
}
flowchart.ClearSelectedCommands();
Undo.RecordObject(flowchart, "Select All");
- foreach (Command command in flowchart.selectedBlock.commandList)
+ foreach (Command command in flowchart.SelectedBlock.CommandList)
{
flowchart.AddSelectedCommand(command);
}
@@ -873,7 +869,7 @@ namespace Fungus
Flowchart flowchart = block.GetFlowchart();
if (flowchart == null ||
- flowchart.selectedBlock == null)
+ flowchart.SelectedBlock == null)
{
return;
}
@@ -896,7 +892,7 @@ namespace Fungus
Flowchart flowchart = block.GetFlowchart();
if (flowchart == null ||
- flowchart.selectedBlock == null)
+ flowchart.SelectedBlock == null)
{
return;
}
@@ -905,9 +901,9 @@ namespace Fungus
commandCopyBuffer.Clear();
// Scan through all commands in execution order to see if each needs to be copied
- foreach (Command command in flowchart.selectedBlock.commandList)
+ foreach (Command command in flowchart.SelectedBlock.CommandList)
{
- if (flowchart.selectedCommands.Contains(command))
+ if (flowchart.SelectedCommands.Contains(command))
{
System.Type type = command.GetType();
Command newCommand = Undo.AddComponent(commandCopyBuffer.gameObject, type) as Command;
@@ -926,7 +922,7 @@ namespace Fungus
Flowchart flowchart = block.GetFlowchart();
if (flowchart == null ||
- flowchart.selectedBlock == null)
+ flowchart.SelectedBlock == null)
{
return;
}
@@ -934,14 +930,14 @@ namespace Fungus
CommandCopyBuffer commandCopyBuffer = CommandCopyBuffer.GetInstance();
// Find where to paste commands in block (either at end or after last selected command)
- int pasteIndex = flowchart.selectedBlock.commandList.Count;
- if (flowchart.selectedCommands.Count > 0)
+ int pasteIndex = flowchart.SelectedBlock.CommandList.Count;
+ if (flowchart.SelectedCommands.Count > 0)
{
- for (int i = 0; i < flowchart.selectedBlock.commandList.Count; ++i)
+ for (int i = 0; i < flowchart.SelectedBlock.CommandList.Count; ++i)
{
- Command command = flowchart.selectedBlock.commandList[i];
+ Command command = flowchart.SelectedBlock.CommandList[i];
- foreach (Command selectedCommand in flowchart.selectedCommands)
+ foreach (Command selectedCommand in flowchart.SelectedCommands)
{
if (command == selectedCommand)
{
@@ -963,8 +959,8 @@ namespace Fungus
Command pastedCommand = commands.Last();
if (pastedCommand != null)
{
- pastedCommand.itemId = flowchart.NextItemId();
- flowchart.selectedBlock.commandList.Insert(pasteIndex++, pastedCommand);
+ pastedCommand.ItemId = flowchart.NextItemId();
+ flowchart.SelectedBlock.CommandList.Insert(pasteIndex++, pastedCommand);
}
}
@@ -985,15 +981,15 @@ namespace Fungus
Flowchart flowchart = block.GetFlowchart();
if (flowchart == null ||
- flowchart.selectedBlock == null)
+ flowchart.SelectedBlock == null)
{
return;
}
int lastSelectedIndex = 0;
- for (int i = flowchart.selectedBlock.commandList.Count - 1; i >= 0; --i)
+ for (int i = flowchart.SelectedBlock.CommandList.Count - 1; i >= 0; --i)
{
- Command command = flowchart.selectedBlock.commandList[i];
- foreach (Command selectedCommand in flowchart.selectedCommands)
+ Command command = flowchart.SelectedBlock.CommandList[i];
+ foreach (Command selectedCommand in flowchart.SelectedCommands)
{
if (command == selectedCommand)
{
@@ -1002,8 +998,8 @@ namespace Fungus
// Order of destruction is important here for undo to work
Undo.DestroyObjectImmediate(command);
- Undo.RecordObject(flowchart.selectedBlock, "Delete");
- flowchart.selectedBlock.commandList.RemoveAt(i);
+ Undo.RecordObject(flowchart.SelectedBlock, "Delete");
+ flowchart.SelectedBlock.CommandList.RemoveAt(i);
lastSelectedIndex = i;
@@ -1015,9 +1011,9 @@ namespace Fungus
Undo.RecordObject(flowchart, "Delete");
flowchart.ClearSelectedCommands();
- if (lastSelectedIndex < flowchart.selectedBlock.commandList.Count)
+ if (lastSelectedIndex < flowchart.SelectedBlock.CommandList.Count)
{
- Command nextCommand = flowchart.selectedBlock.commandList[lastSelectedIndex];
+ Command nextCommand = flowchart.SelectedBlock.CommandList[lastSelectedIndex];
block.GetFlowchart().AddSelectedCommand(nextCommand);
}
@@ -1028,19 +1024,19 @@ namespace Fungus
{
Block targetBlock = target as Block;
Flowchart flowchart = targetBlock.GetFlowchart();
- Command command = flowchart.selectedCommands[0];
+ Command command = flowchart.SelectedCommands[0];
if (targetBlock.IsExecuting())
{
// The Block is already executing.
// Tell the Block to stop, wait a little while so the executing command has a
// chance to stop, and then start execution again from the new command.
targetBlock.Stop();
- flowchart.StartCoroutine(RunBlock(flowchart, targetBlock, command.commandIndex, 0.2f));
+ flowchart.StartCoroutine(RunBlock(flowchart, targetBlock, command.CommandIndex, 0.2f));
}
else
{
// Block isn't executing yet so can start it now.
- flowchart.ExecuteBlock(targetBlock, command.commandIndex);
+ flowchart.ExecuteBlock(targetBlock, command.CommandIndex);
}
}
@@ -1048,11 +1044,11 @@ namespace Fungus
{
Block targetBlock = target as Block;
Flowchart flowchart = targetBlock.GetFlowchart();
- Command command = flowchart.selectedCommands[0];
+ Command command = flowchart.SelectedCommands[0];
// Stop all active blocks then run the selected block.
flowchart.StopAllBlocks();
- flowchart.StartCoroutine(RunBlock(flowchart, targetBlock, command.commandIndex, 0.2f));
+ flowchart.StartCoroutine(RunBlock(flowchart, targetBlock, command.CommandIndex, 0.2f));
}
protected IEnumerator RunBlock(Flowchart flowchart, Block targetBlock, int commandIndex, float delay)
@@ -1066,15 +1062,15 @@ namespace Fungus
Block block = target as Block;
Flowchart flowchart = block.GetFlowchart();
- int firstSelectedIndex = flowchart.selectedBlock.commandList.Count;
+ int firstSelectedIndex = flowchart.SelectedBlock.CommandList.Count;
bool firstSelectedCommandFound = false;
- if (flowchart.selectedCommands.Count > 0)
+ if (flowchart.SelectedCommands.Count > 0)
{
- for (int i = 0; i < flowchart.selectedBlock.commandList.Count; i++)
+ for (int i = 0; i < flowchart.SelectedBlock.CommandList.Count; i++)
{
- Command commandInBlock = flowchart.selectedBlock.commandList[i];
+ Command commandInBlock = flowchart.SelectedBlock.CommandList[i];
- foreach (Command selectedCommand in flowchart.selectedCommands)
+ foreach (Command selectedCommand in flowchart.SelectedCommands)
{
if (commandInBlock == selectedCommand)
{
@@ -1095,7 +1091,7 @@ namespace Fungus
if (firstSelectedIndex > 0)
{
flowchart.ClearSelectedCommands();
- flowchart.AddSelectedCommand(flowchart.selectedBlock.commandList[firstSelectedIndex-1]);
+ flowchart.AddSelectedCommand(flowchart.SelectedBlock.CommandList[firstSelectedIndex-1]);
}
Repaint();
@@ -1107,13 +1103,13 @@ namespace Fungus
Flowchart flowchart = block.GetFlowchart();
int lastSelectedIndex = -1;
- if (flowchart.selectedCommands.Count > 0)
+ if (flowchart.SelectedCommands.Count > 0)
{
- for (int i = 0; i < flowchart.selectedBlock.commandList.Count; i++)
+ for (int i = 0; i < flowchart.SelectedBlock.CommandList.Count; i++)
{
- Command commandInBlock = flowchart.selectedBlock.commandList[i];
+ Command commandInBlock = flowchart.SelectedBlock.CommandList[i];
- foreach (Command selectedCommand in flowchart.selectedCommands)
+ foreach (Command selectedCommand in flowchart.SelectedCommands)
{
if (commandInBlock == selectedCommand)
{
@@ -1122,14 +1118,13 @@ namespace Fungus
}
}
}
- if (lastSelectedIndex < flowchart.selectedBlock.commandList.Count-1)
+ if (lastSelectedIndex < flowchart.SelectedBlock.CommandList.Count-1)
{
flowchart.ClearSelectedCommands();
- flowchart.AddSelectedCommand(flowchart.selectedBlock.commandList[lastSelectedIndex+1]);
+ flowchart.AddSelectedCommand(flowchart.SelectedBlock.CommandList[lastSelectedIndex+1]);
}
Repaint();
}
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Editor/BlockInspector.cs b/Assets/Fungus/Flowchart/Editor/BlockInspector.cs
index 35961ef2..02962d28 100644
--- a/Assets/Fungus/Flowchart/Editor/BlockInspector.cs
+++ b/Assets/Fungus/Flowchart/Editor/BlockInspector.cs
@@ -1,30 +1,26 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
using UnityEditor;
-using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace Fungus
{
- /**
- * Temp hidden object which lets us use the entire inspector window to inspect
- * the block command list.
- */
+ ///
+ /// Temp hidden object which lets us use the entire inspector window to inspect the block command list.
+ ///
public class BlockInspector : ScriptableObject
{
[FormerlySerializedAs("sequence")]
public Block block;
}
- /**
- * Custom editor for the temp hidden object.
- */
+ ///
+ /// Custom editor for the temp hidden object.
+ ///
[CustomEditor (typeof(BlockInspector), true)]
public class BlockInspectorEditor : Editor
{
@@ -101,19 +97,19 @@ namespace Fungus
Rect blockRect = new Rect(5, topPanelHeight, width - 5, height + 10);
GUILayout.BeginArea(blockRect);
- blockScrollPos = GUILayout.BeginScrollView(blockScrollPos, GUILayout.Height(flowchart.blockViewHeight));
+ blockScrollPos = GUILayout.BeginScrollView(blockScrollPos, GUILayout.Height(flowchart.BlockViewHeight));
activeBlockEditor.DrawBlockGUI(flowchart);
GUILayout.EndScrollView();
Command inspectCommand = null;
- if (flowchart.selectedCommands.Count == 1)
+ if (flowchart.SelectedCommands.Count == 1)
{
- inspectCommand = flowchart.selectedCommands[0];
+ inspectCommand = flowchart.SelectedCommands[0];
}
if (Application.isPlaying &&
inspectCommand != null &&
- inspectCommand.parentBlock != block)
+ inspectCommand.ParentBlock != block)
{
GUILayout.EndArea();
Repaint();
@@ -189,7 +185,7 @@ namespace Fungus
// Draw the resize bar after everything else has finished drawing
// This is mainly to avoid incorrect indenting.
- Rect resizeRect = new Rect(0, topPanelHeight + flowchart.blockViewHeight + 1, Screen.width, 4f);
+ Rect resizeRect = new Rect(0, topPanelHeight + flowchart.BlockViewHeight + 1, Screen.width, 4f);
GUI.color = new Color(0.64f, 0.64f, 0.64f);
GUI.DrawTexture(resizeRect, EditorGUIUtility.whiteTexture);
resizeRect.height = 1;
@@ -204,7 +200,7 @@ namespace Fungus
private void ResizeScrollView(Flowchart flowchart)
{
- Rect cursorChangeRect = new Rect(0, flowchart.blockViewHeight + 1, Screen.width, 4f);
+ Rect cursorChangeRect = new Rect(0, flowchart.BlockViewHeight + 1, Screen.width, 4f);
EditorGUIUtility.AddCursorRect(cursorChangeRect, MouseCursor.ResizeVertical);
@@ -216,7 +212,7 @@ namespace Fungus
if (resize)
{
Undo.RecordObject(flowchart, "Resize view");
- flowchart.blockViewHeight = Event.current.mousePosition.y;
+ flowchart.BlockViewHeight = Event.current.mousePosition.y;
}
ClampBlockViewHeight(flowchart);
@@ -251,10 +247,10 @@ namespace Fungus
if (clamp)
{
// Make sure block view is always clamped to visible area
- float height = flowchart.blockViewHeight;
+ float height = flowchart.BlockViewHeight;
height = Mathf.Max(200, height);
height = Mathf.Min(Screen.height - 200,height);
- flowchart.blockViewHeight = height;
+ flowchart.BlockViewHeight = height;
}
if (Event.current.type == EventType.Repaint)
@@ -263,5 +259,4 @@ namespace Fungus
}
}
}
-
}
diff --git a/Assets/Fungus/Flowchart/Editor/CallEditor.cs b/Assets/Fungus/Flowchart/Editor/CallEditor.cs
index da3ffda1..8be7baac 100644
--- a/Assets/Fungus/Flowchart/Editor/CallEditor.cs
+++ b/Assets/Fungus/Flowchart/Editor/CallEditor.cs
@@ -1,12 +1,8 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
@@ -62,5 +58,4 @@ namespace Fungus
serializedObject.ApplyModifiedProperties();
}
}
-
}
diff --git a/Assets/Fungus/Flowchart/Editor/CommandEditor.cs b/Assets/Fungus/Flowchart/Editor/CommandEditor.cs
index 285d43ab..d5f6d64c 100644
--- a/Assets/Fungus/Flowchart/Editor/CommandEditor.cs
+++ b/Assets/Fungus/Flowchart/Editor/CommandEditor.cs
@@ -1,12 +1,8 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
-using UnityEditorInternal;
using UnityEngine;
-using System.Collections;
using System.Collections.Generic;
using Rotorz.ReorderableList;
@@ -57,7 +53,7 @@ namespace Fungus
if (t.enabled)
{
- if (flowchart.colorCommands)
+ if (flowchart.ColorCommands)
{
GUI.backgroundColor = t.GetButtonColor();
}
@@ -77,7 +73,7 @@ namespace Fungus
GUILayout.FlexibleSpace();
- GUILayout.Label(new GUIContent("(" + t.itemId + ")"));
+ GUILayout.Label(new GUIContent("(" + t.ItemId + ")"));
GUILayout.Space(10);
@@ -100,11 +96,11 @@ namespace Fungus
EditorGUILayout.Separator();
- if (t.errorMessage.Length > 0)
+ if (t.ErrorMessage.Length > 0)
{
GUIStyle style = new GUIStyle(GUI.skin.label);
style.normal.textColor = new Color(1,0,0);
- EditorGUILayout.LabelField(new GUIContent("Error: " + t.errorMessage), style);
+ EditorGUILayout.LabelField(new GUIContent("Error: " + t.ErrorMessage), style);
}
GUILayout.EndVertical();
@@ -202,14 +198,12 @@ namespace Fungus
}
- /**
- * When modifying custom editor code you can occasionally end up with orphaned editor instances.
- * When this happens, you'll get a null exception error every time the scene serializes / deserialized.
- * Once this situation occurs, the only way to fix it is to restart the Unity editor.
- *
- * As a workaround, this function detects if this command editor is an orphan and deletes it.
- * To use it, just call this function at the top of the OnEnable() method in your custom editor.
- */
+ // When modifying custom editor code you can occasionally end up with orphaned editor instances.
+ // When this happens, you'll get a null exception error every time the scene serializes / deserialized.
+ // Once this situation occurs, the only way to fix it is to restart the Unity editor.
+ //
+ // As a workaround, this function detects if this command editor is an orphan and deletes it.
+ // To use it, just call this function at the top of the OnEnable() method in your custom editor.
protected virtual bool NullTargetCheck()
{
try
diff --git a/Assets/Fungus/Flowchart/Editor/CommandListAdaptor.cs b/Assets/Fungus/Flowchart/Editor/CommandListAdaptor.cs
index 01e3a54a..352401a5 100644
--- a/Assets/Fungus/Flowchart/Editor/CommandListAdaptor.cs
+++ b/Assets/Fungus/Flowchart/Editor/CommandListAdaptor.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
// Copyright (c) 2012-2013 Rotorz Limited. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
@@ -10,8 +8,6 @@
using UnityEngine;
using UnityEditor;
using System;
-using System.Collections.Generic;
-using System.Linq;
using Rotorz.ReorderableList;
namespace Fungus
@@ -88,14 +84,14 @@ namespace Fungus
return null;
}
- Block block = flowchart.selectedBlock;
+ Block block = flowchart.SelectedBlock;
if (block == null)
{
return null;
}
Command newCommand = Undo.AddComponent(block.gameObject) as Command;
- newCommand.itemId = flowchart.NextItemId();
+ newCommand.ItemId = flowchart.NextItemId();
flowchart.ClearSelectedCommands();
flowchart.AddSelectedCommand(newCommand);
@@ -111,7 +107,7 @@ namespace Fungus
System.Type type = command.GetType();
Command newCommand = Undo.AddComponent(parentBlock.gameObject, type) as Command;
- newCommand.itemId = newCommand.GetFlowchart().NextItemId();
+ newCommand.ItemId = newCommand.GetFlowchart().NextItemId();
System.Reflection.FieldInfo[] fields = type.GetFields();
foreach (System.Reflection.FieldInfo field in fields)
{
@@ -205,7 +201,7 @@ namespace Fungus
}
bool commandIsSelected = false;
- foreach (Command selectedCommand in flowchart.selectedCommands)
+ foreach (Command selectedCommand in flowchart.SelectedCommands)
{
if (selectedCommand == command)
{
@@ -229,7 +225,7 @@ namespace Fungus
commandLabelStyle.padding.top -= 1;
float indentSize = 20;
- for (int i = 0; i < command.indentLevel; ++i)
+ for (int i = 0; i < command.IndentLevel; ++i)
{
Rect indentRect = position;
indentRect.x += i * indentSize - 21;
@@ -241,12 +237,12 @@ namespace Fungus
}
float commandNameWidth = Mathf.Max(commandLabelStyle.CalcSize(new GUIContent(commandName)).x, 90f);
- float indentWidth = command.indentLevel * indentSize;
+ float indentWidth = command.IndentLevel * indentSize;
Rect commandLabelRect = position;
commandLabelRect.x += indentWidth - 21;
commandLabelRect.y -= 2;
- commandLabelRect.width -= (indentSize * command.indentLevel - 22);
+ commandLabelRect.width -= (indentSize * command.IndentLevel - 22);
commandLabelRect.height += 5;
// There's a weird incompatibility between the Reorderable list control used for the command list and
@@ -263,14 +259,14 @@ namespace Fungus
Event.current.button == 0 &&
clickRect.Contains(Event.current.mousePosition))
{
- if (flowchart.selectedCommands.Contains(command) && Event.current.button == 0)
+ if (flowchart.SelectedCommands.Contains(command) && Event.current.button == 0)
{
// Left click on already selected command
// Command key and shift key is not pressed
if (!EditorGUI.actionKey && !Event.current.shift)
{
BlockEditor.actionList.Add ( delegate {
- flowchart.selectedCommands.Remove(command);
+ flowchart.SelectedCommands.Remove(command);
flowchart.ClearSelectedCommands();
});
}
@@ -279,7 +275,7 @@ namespace Fungus
if (EditorGUI.actionKey)
{
BlockEditor.actionList.Add ( delegate {
- flowchart.selectedCommands.Remove(command);
+ flowchart.SelectedCommands.Remove(command);
});
Event.current.Use();
}
@@ -304,14 +300,14 @@ namespace Fungus
// Find first and last selected commands
int firstSelectedIndex = -1;
int lastSelectedIndex = -1;
- if (flowchart.selectedCommands.Count > 0)
+ if (flowchart.SelectedCommands.Count > 0)
{
- if ( flowchart.selectedBlock != null)
+ if ( flowchart.SelectedBlock != null)
{
- for (int i = 0; i < flowchart.selectedBlock.commandList.Count; i++)
+ for (int i = 0; i < flowchart.SelectedBlock.CommandList.Count; i++)
{
- Command commandInBlock = flowchart.selectedBlock.commandList[i];
- foreach (Command selectedCommand in flowchart.selectedCommands)
+ Command commandInBlock = flowchart.SelectedBlock.CommandList[i];
+ foreach (Command selectedCommand in flowchart.SelectedCommands)
{
if (commandInBlock == selectedCommand)
{
@@ -320,10 +316,10 @@ namespace Fungus
}
}
}
- for (int i = flowchart.selectedBlock.commandList.Count - 1; i >=0; i--)
+ for (int i = flowchart.SelectedBlock.CommandList.Count - 1; i >=0; i--)
{
- Command commandInBlock = flowchart.selectedBlock.commandList[i];
- foreach (Command selectedCommand in flowchart.selectedCommands)
+ Command commandInBlock = flowchart.SelectedBlock.CommandList[i];
+ foreach (Command selectedCommand in flowchart.SelectedCommands)
{
if (commandInBlock == selectedCommand)
{
@@ -337,7 +333,7 @@ namespace Fungus
if (shift)
{
- int currentIndex = command.commandIndex;
+ int currentIndex = command.CommandIndex;
if (firstSelectedIndex == -1 ||
lastSelectedIndex == -1)
{
@@ -359,7 +355,7 @@ namespace Fungus
for (int i = Math.Min(firstSelectedIndex, lastSelectedIndex); i < Math.Max(firstSelectedIndex, lastSelectedIndex); ++i)
{
- Command selectedCommand = flowchart.selectedBlock.commandList[i];
+ Command selectedCommand = flowchart.SelectedBlock.CommandList[i];
BlockEditor.actionList.Add ( delegate {
flowchart.AddSelectedCommand(selectedCommand);
});
@@ -372,7 +368,7 @@ namespace Fungus
}
Color commandLabelColor = Color.white;
- if (flowchart.colorCommands)
+ if (flowchart.ColorCommands)
{
commandLabelColor = command.GetButtonColor();
}
@@ -399,9 +395,9 @@ namespace Fungus
else
{
string commandNameLabel;
- if (flowchart.showLineNumbers)
+ if (flowchart.ShowLineNumbers)
{
- commandNameLabel = command.commandIndex.ToString() + ": " + commandName;
+ commandNameLabel = command.CommandIndex.ToString() + ": " + commandName;
}
else
{
@@ -411,7 +407,7 @@ namespace Fungus
GUI.Label(commandLabelRect, commandNameLabel, commandLabelStyle);
}
- if (command.executingIconTimer > Time.realtimeSinceStartup)
+ if (command.ExecutingIconTimer > Time.realtimeSinceStartup)
{
Rect iconRect = new Rect(commandLabelRect);
iconRect.x += iconRect.width - commandLabelRect.width - 20;
@@ -420,7 +416,7 @@ namespace Fungus
Color storeColor = GUI.color;
- float alpha = (command.executingIconTimer - Time.realtimeSinceStartup) / Block.executingIconFadeTime;
+ float alpha = (command.ExecutingIconTimer - Time.realtimeSinceStartup) / Block.executingIconFadeTime;
alpha = Mathf.Clamp01(alpha);
GUI.color = new Color(1f, 1f, 1f, alpha);
diff --git a/Assets/Fungus/Flowchart/Editor/CustomGUI.cs b/Assets/Fungus/Flowchart/Editor/CustomGUI.cs
index 6ea94695..07e64549 100644
--- a/Assets/Fungus/Flowchart/Editor/CustomGUI.cs
+++ b/Assets/Fungus/Flowchart/Editor/CustomGUI.cs
@@ -1,20 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using UnityEngine.Internal;
-using UnityEditor;
-using System;
-using System.Reflection;
namespace Fungus
{
-
- /**
- * Utility functions for drawing custom UI in the editor
- */
+ ///
+ /// Utility functions for drawing custom UI in the editor.
+ ///
public static class CustomGUI
{
public static Texture2D CreateBlackTexture()
@@ -46,5 +39,4 @@ namespace Fungus
GUILayout.Box(blackTex,separatorStyle);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Editor/EditorExtensions.cs b/Assets/Fungus/Flowchart/Editor/EditorExtensions.cs
index 196f1b3e..e5aed88a 100644
--- a/Assets/Fungus/Flowchart/Editor/EditorExtensions.cs
+++ b/Assets/Fungus/Flowchart/Editor/EditorExtensions.cs
@@ -1,16 +1,12 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace Fungus
{
-
public static class EditorExtensions
{
///
@@ -68,5 +64,4 @@ namespace Fungus
return FindDerivedTypesFromAssembly(System.Reflection.Assembly.GetAssembly(baseType), baseType, classOnly);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Editor/EditorZoomArea.cs b/Assets/Fungus/Flowchart/Editor/EditorZoomArea.cs
index b2f58013..6025f0f0 100644
--- a/Assets/Fungus/Flowchart/Editor/EditorZoomArea.cs
+++ b/Assets/Fungus/Flowchart/Editor/EditorZoomArea.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
// Original code by Martin Ecker (http://martinecker.com)
@@ -9,7 +7,6 @@ using UnityEngine;
namespace Fungus
{
-
// Helper Rect extension methods
public static class RectExtensions
{
@@ -87,5 +84,4 @@ namespace Fungus
GUI.BeginGroup(new Rect(0.0f, kEditorWindowTabHeight, Screen.width, Screen.height));
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Editor/EventHandlerEditor.cs b/Assets/Fungus/Flowchart/Editor/EventHandlerEditor.cs
index 89b085c7..a8de2452 100644
--- a/Assets/Fungus/Flowchart/Editor/EventHandlerEditor.cs
+++ b/Assets/Fungus/Flowchart/Editor/EventHandlerEditor.cs
@@ -1,23 +1,17 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
-using UnityEditorInternal;
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
-
[CustomEditor (typeof(EventHandler), true)]
public class EventHandlerEditor : Editor
{
- /**
- * Returns the class attribute info for an event handler class.
- */
+ ///
+ /// Returns the class attribute info for an event handler class.
+ ///
public static EventHandlerInfoAttribute GetEventHandlerInfo(System.Type eventHandlerType)
{
object[] attributes = eventHandlerType.GetCustomAttributes(typeof(EventHandlerInfoAttribute), false);
@@ -64,5 +58,4 @@ namespace Fungus
serializedObject.ApplyModifiedProperties();
}
}
-
}
diff --git a/Assets/Fungus/Flowchart/Editor/Extensions/SerializedPropertyExtensions.cs b/Assets/Fungus/Flowchart/Editor/Extensions/SerializedPropertyExtensions.cs
index 31f1fe2d..fa962712 100644
--- a/Assets/Fungus/Flowchart/Editor/Extensions/SerializedPropertyExtensions.cs
+++ b/Assets/Fungus/Flowchart/Editor/Extensions/SerializedPropertyExtensions.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
using UnityEngine;
diff --git a/Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs b/Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs
index 94c66893..8edf66d0 100644
--- a/Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs
+++ b/Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs
@@ -1,16 +1,12 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
using UnityEngine;
-using System.Collections;
using System.Collections.Generic;
using Rotorz.ReorderableList;
using System.Linq;
using System.Reflection;
-using System.IO;
namespace Fungus
{
@@ -91,8 +87,8 @@ namespace Fungus
if (GUILayout.Button(new GUIContent("Center View", "Centers the window view at the center of all blocks in the Flowchart")))
{
// Reset the zoom so we don't have adjust the center position depending on zoom
- flowchart.scrollPos = flowchart.centerPosition;
- flowchart.zoom = FlowchartWindow.maxZoomValue;
+ flowchart.ScrollPos = flowchart.CenterPosition;
+ flowchart.Zoom = FlowchartWindow.maxZoomValue;
}
GUILayout.FlexibleSpace();
GUILayout.EndHorizontal();
@@ -106,16 +102,16 @@ namespace Fungus
Flowchart t = target as Flowchart;
- if (t.variables.Count == 0)
+ if (t.Variables.Count == 0)
{
- t.variablesExpanded = true;
+ t.VariablesExpanded = true;
}
- if (!t.variablesExpanded)
+ if (!t.VariablesExpanded)
{
- if (GUILayout.Button ("Variables (" + t.variables.Count + ")", GUILayout.Height(24)))
+ if (GUILayout.Button ("Variables (" + t.Variables.Count + ")", GUILayout.Height(24)))
{
- t.variablesExpanded = true;
+ t.VariablesExpanded = true;
}
// Draw disclosure triangle
@@ -128,15 +124,15 @@ namespace Fungus
{
Rect listRect = new Rect();
- if (t.variables.Count > 0)
+ if (t.Variables.Count > 0)
{
// Remove any null variables from the list
// Can sometimes happen when upgrading to a new version of Fungus (if .meta GUID changes for a variable class)
- for (int i = t.variables.Count - 1; i >= 0; i--)
+ for (int i = t.Variables.Count - 1; i >= 0; i--)
{
- if (t.variables[i] == null)
+ if (t.Variables[i] == null)
{
- t.variables.RemoveAt(i);
+ t.Variables.RemoveAt(i);
}
}
@@ -170,7 +166,7 @@ namespace Fungus
if (GUI.Button (buttonRect, "Variables"))
{
- t.variablesExpanded = false;
+ t.VariablesExpanded = false;
}
// Draw disclosure triangle
@@ -249,8 +245,8 @@ namespace Fungus
Undo.RecordObject(flowchart, "Add Variable");
Variable newVariable = flowchart.gameObject.AddComponent(variableType) as Variable;
- newVariable.key = flowchart.GetUniqueVariableKey("");
- flowchart.variables.Add(newVariable);
+ newVariable.Key = flowchart.GetUniqueVariableKey("");
+ flowchart.Variables.Add(newVariable);
// Because this is an async call, we need to force prefab instances to record changes
PrefabUtility.RecordPrefabInstancePropertyModifications(flowchart);
@@ -273,12 +269,12 @@ namespace Fungus
}
- /**
- * When modifying custom editor code you can occasionally end up with orphaned editor instances.
- * When this happens, you'll get a null exception error every time the scene serializes / deserialized.
- * Once this situation occurs, the only way to fix it is to restart the Unity editor.
- * As a workaround, this function detects if this editor is an orphan and deletes it.
- */
+ ///
+ /// When modifying custom editor code you can occasionally end up with orphaned editor instances.
+ /// When this happens, you'll get a null exception error every time the scene serializes / deserialized.
+ /// Once this situation occurs, the only way to fix it is to restart the Unity editor.
+ /// As a workaround, this function detects if this editor is an orphan and deletes it.
+ ///
protected virtual bool NullTargetCheck()
{
try
@@ -297,5 +293,4 @@ namespace Fungus
return false;
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs b/Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs
index d4afc13d..db685b29 100644
--- a/Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs
+++ b/Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs
@@ -1,16 +1,11 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEditor;
-using System.IO;
-using System.Collections;
namespace Fungus
{
-
public class FlowchartMenuItems
{
[MenuItem("Tools/Fungus/Create/Flowchart", false, 0)]
@@ -23,15 +18,15 @@ namespace Fungus
Flowchart flowchart = go.GetComponent();
if (flowchart != null)
{
- flowchart.version = Flowchart.CURRENT_VERSION;
+ flowchart.Version = Flowchart.CURRENT_VERSION;
}
// Only the first created Flowchart in the scene should have a default GameStarted block
if (GameObject.FindObjectsOfType().Length > 1)
{
Block block = go.GetComponent();
- block.eventHandler = null;
- GameObject.DestroyImmediate(block.eventHandler);
+ block._EventHandler = null;
+ GameObject.DestroyImmediate(block._EventHandler);
}
}
@@ -82,5 +77,4 @@ namespace Fungus
return go;
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Editor/FlowchartWindow.cs b/Assets/Fungus/Flowchart/Editor/FlowchartWindow.cs
index 7e7e5c7d..26b5c3f4 100644
--- a/Assets/Fungus/Flowchart/Editor/FlowchartWindow.cs
+++ b/Assets/Fungus/Flowchart/Editor/FlowchartWindow.cs
@@ -1,14 +1,11 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
using System;
using System.Linq;
-using System.Collections;
using System.Collections.Generic;
namespace Fungus
@@ -71,13 +68,13 @@ namespace Fungus
}
if (Selection.activeGameObject == null &&
- flowchart.selectedBlock != null)
+ flowchart.SelectedBlock != null)
{
if (blockInspector == null)
{
ShowBlockInspector(flowchart);
}
- blockInspector.block = flowchart.selectedBlock;
+ blockInspector.block = flowchart.SelectedBlock;
}
forceRepaintCount--;
@@ -103,11 +100,11 @@ namespace Fungus
Flowchart fs = Selection.activeGameObject.GetComponent();
if (fs != null)
{
- fungusState.selectedFlowchart = fs;
+ fungusState.SelectedFlowchart = fs;
}
}
- return fungusState.selectedFlowchart;
+ return fungusState.SelectedFlowchart;
}
protected virtual void OnGUI()
@@ -122,9 +119,9 @@ namespace Fungus
// Delete any scheduled objects
foreach (Block deleteBlock in deleteList)
{
- bool isSelected = (flowchart.selectedBlock == deleteBlock);
+ bool isSelected = (flowchart.SelectedBlock == deleteBlock);
- foreach (Command command in deleteBlock.commandList)
+ foreach (Command command in deleteBlock.CommandList)
{
Undo.DestroyObjectImmediate(command);
}
@@ -160,22 +157,22 @@ namespace Fungus
if (GUILayout.Button(new GUIContent(addTexture, "Add a new block")))
{
- Vector2 newNodePosition = new Vector2(50 - flowchart.scrollPos.x,
- 50 - flowchart.scrollPos.y);
+ Vector2 newNodePosition = new Vector2(50 - flowchart.ScrollPos.x,
+ 50 - flowchart.ScrollPos.y);
CreateBlock(flowchart, newNodePosition);
}
GUILayout.Space(8);
- flowchart.zoom = GUILayout.HorizontalSlider(flowchart.zoom, minZoomValue, maxZoomValue, GUILayout.Width(100));
+ flowchart.Zoom = GUILayout.HorizontalSlider(flowchart.Zoom, minZoomValue, maxZoomValue, GUILayout.Width(100));
GUILayout.FlexibleSpace();
GUILayout.BeginVertical();
GUILayout.Label(flowchart.name, EditorStyles.whiteBoldLabel);
- if (flowchart.description.Length > 0)
+ if (flowchart.Description.Length > 0)
{
- GUILayout.Label(flowchart.description, EditorStyles.helpBox);
+ GUILayout.Label(flowchart.Description, EditorStyles.helpBox);
}
GUILayout.EndVertical();
@@ -189,7 +186,7 @@ namespace Fungus
GUILayout.FlexibleSpace();
- flowchart.variablesScrollPos = GUILayout.BeginScrollView(flowchart.variablesScrollPos, GUILayout.MaxHeight(position.height * 0.75f));
+ flowchart.VariablesScrollPos = GUILayout.BeginScrollView(flowchart.VariablesScrollPos, GUILayout.MaxHeight(position.height * 0.75f));
GUILayout.FlexibleSpace();
@@ -200,8 +197,8 @@ namespace Fungus
DestroyImmediate(flowchartEditor);
Rect variableWindowRect = GUILayoutUtility.GetLastRect();
- if (flowchart.variablesExpanded &&
- flowchart.variables.Count > 0)
+ if (flowchart.VariablesExpanded &&
+ flowchart.Variables.Count > 0)
{
variableWindowRect.y -= 20;
variableWindowRect.height += 20;
@@ -226,16 +223,18 @@ namespace Fungus
foreach (Block block in blocks)
{
- flowchart.scrollViewRect.xMin = Mathf.Min(flowchart.scrollViewRect.xMin, block.nodeRect.xMin - 400);
- flowchart.scrollViewRect.xMax = Mathf.Max(flowchart.scrollViewRect.xMax, block.nodeRect.xMax + 400);
- flowchart.scrollViewRect.yMin = Mathf.Min(flowchart.scrollViewRect.yMin, block.nodeRect.yMin - 400);
- flowchart.scrollViewRect.yMax = Mathf.Max(flowchart.scrollViewRect.yMax, block.nodeRect.yMax + 400);
+ var newRect = new Rect();
+ newRect.xMin = Mathf.Min(flowchart.ScrollViewRect.xMin, block._NodeRect.xMin - 400);
+ newRect.xMax = Mathf.Max(flowchart.ScrollViewRect.xMax, block._NodeRect.xMax + 400);
+ newRect.yMin = Mathf.Min(flowchart.ScrollViewRect.yMin, block._NodeRect.yMin - 400);
+ newRect.yMax = Mathf.Max(flowchart.ScrollViewRect.yMax, block._NodeRect.yMax + 400);
+ flowchart.ScrollViewRect = newRect;
}
// Calc rect for script view
- Rect scriptViewRect = new Rect(0, 0, this.position.width / flowchart.zoom, this.position.height / flowchart.zoom);
+ Rect scriptViewRect = new Rect(0, 0, this.position.width / flowchart.Zoom, this.position.height / flowchart.Zoom);
- EditorZoomArea.Begin(flowchart.zoom, scriptViewRect);
+ EditorZoomArea.Begin(flowchart.Zoom, scriptViewRect);
DrawGrid(flowchart);
@@ -245,7 +244,7 @@ namespace Fungus
Event.current.type == EventType.MouseDown &&
!mouseOverVariables)
{
- flowchart.selectedBlock = null;
+ flowchart.SelectedBlock = null;
if (!EditorGUI.actionKey)
{
flowchart.ClearSelectedCommands();
@@ -277,46 +276,49 @@ namespace Fungus
{
Block block = blocks[i];
- float nodeWidthA = nodeStyle.CalcSize(new GUIContent(block.blockName)).x + 10;
+ float nodeWidthA = nodeStyle.CalcSize(new GUIContent(block.BlockName)).x + 10;
float nodeWidthB = 0f;
- if (block.eventHandler != null)
+ if (block._EventHandler != null)
{
- nodeWidthB = nodeStyle.CalcSize(new GUIContent(block.eventHandler.GetSummary())).x + 10;
+ nodeWidthB = nodeStyle.CalcSize(new GUIContent(block._EventHandler.GetSummary())).x + 10;
}
-
- block.nodeRect.width = Mathf.Max(Mathf.Max(nodeWidthA, nodeWidthB), 120);
- block.nodeRect.height = 40;
-
+
if (Event.current.button == 0)
{
+ Rect tempRect = block._NodeRect;
+ tempRect.width = Mathf.Max(Mathf.Max(nodeWidthA, nodeWidthB), 120);
+ tempRect.height = 40;
+
if (Event.current.type == EventType.MouseDrag && dragWindowId == i)
{
- block.nodeRect.x += Event.current.delta.x;
- block.nodeRect.y += Event.current.delta.y;
+ tempRect.x += Event.current.delta.x;
+ tempRect.y += Event.current.delta.y;
forceRepaintCount = 6;
}
else if (Event.current.type == EventType.MouseUp &&
dragWindowId == i)
{
- Vector2 newPos = new Vector2(block.nodeRect.x, block.nodeRect.y);
+ Vector2 newPos = new Vector2(tempRect.x, tempRect.y);
- block.nodeRect.x = startDragPosition.x;
- block.nodeRect.y = startDragPosition.y;
+ tempRect.x = startDragPosition.x;
+ tempRect.y = startDragPosition.y;
Undo.RecordObject(block, "Node Position");
- block.nodeRect.x = newPos.x;
- block.nodeRect.y = newPos.y;
+ tempRect.x = newPos.x;
+ tempRect.y = newPos.y;
dragWindowId = -1;
forceRepaintCount = 6;
}
+
+ block._NodeRect = tempRect;
}
- Rect windowRect = new Rect(block.nodeRect);
- windowRect.x += flowchart.scrollPos.x;
- windowRect.y += flowchart.scrollPos.y;
+ Rect windowRect = new Rect(block._NodeRect);
+ windowRect.x += flowchart.ScrollPos.x;
+ windowRect.y += flowchart.ScrollPos.y;
GUILayout.Window(i, windowRect, DrawWindow, "", windowStyle);
@@ -330,10 +332,10 @@ namespace Fungus
// Draw Event Handler labels
foreach (Block block in blocks)
{
- if (block.eventHandler != null)
+ if (block._EventHandler != null)
{
string handlerLabel = "";
- EventHandlerInfoAttribute info = EventHandlerEditor.GetEventHandlerInfo(block.eventHandler.GetType());
+ EventHandlerInfoAttribute info = EventHandlerEditor.GetEventHandlerInfo(block._EventHandler.GetType());
if (info != null)
{
handlerLabel = "<" + info.EventHandlerName + "> ";
@@ -345,10 +347,10 @@ namespace Fungus
handlerStyle.margin.bottom = 0;
handlerStyle.alignment = TextAnchor.MiddleCenter;
- Rect rect = new Rect(block.nodeRect);
- rect.height = handlerStyle.CalcHeight(new GUIContent(handlerLabel), block.nodeRect.width);
- rect.x += flowchart.scrollPos.x;
- rect.y += flowchart.scrollPos.y - rect.height;
+ Rect rect = new Rect(block._NodeRect);
+ rect.height = handlerStyle.CalcHeight(new GUIContent(handlerLabel), block._NodeRect.width);
+ rect.x += flowchart.ScrollPos.x;
+ rect.y += flowchart.ScrollPos.y - rect.height;
GUI.Label(rect, handlerLabel, handlerStyle);
}
@@ -362,23 +364,23 @@ namespace Fungus
{
if (b.IsExecuting())
{
- b.executingIconTimer = Time.realtimeSinceStartup + Block.executingIconFadeTime;
- b.activeCommand.executingIconTimer = Time.realtimeSinceStartup + Block.executingIconFadeTime;
+ b.ExecutingIconTimer = Time.realtimeSinceStartup + Block.executingIconFadeTime;
+ b.ActiveCommand.ExecutingIconTimer = Time.realtimeSinceStartup + Block.executingIconFadeTime;
forceRepaintCount = 6;
}
- if (b.executingIconTimer > Time.realtimeSinceStartup)
+ if (b.ExecutingIconTimer > Time.realtimeSinceStartup)
{
- Rect rect = new Rect(b.nodeRect);
+ Rect rect = new Rect(b._NodeRect);
- rect.x += flowchart.scrollPos.x - 37;
- rect.y += flowchart.scrollPos.y + 3;
+ rect.x += flowchart.ScrollPos.x - 37;
+ rect.y += flowchart.ScrollPos.y + 3;
rect.width = 34;
rect.height = 34;
if (!b.IsExecuting())
{
- float alpha = (b.executingIconTimer - Time.realtimeSinceStartup) / Block.executingIconFadeTime;
+ float alpha = (b.ExecutingIconTimer - Time.realtimeSinceStartup) / Block.executingIconFadeTime;
alpha = Mathf.Clamp01(alpha);
GUI.color = new Color(1f, 1f, 1f, alpha);
}
@@ -408,15 +410,15 @@ namespace Fungus
return;
}
- Vector2 min = blocks[0].nodeRect.min;
- Vector2 max = blocks[0].nodeRect.max;
+ Vector2 min = blocks[0]._NodeRect.min;
+ Vector2 max = blocks[0]._NodeRect.max;
foreach (Block block in blocks)
{
- min.x = Mathf.Min(min.x, block.nodeRect.center.x);
- min.y = Mathf.Min(min.y, block.nodeRect.center.y);
- max.x = Mathf.Max(max.x, block.nodeRect.center.x);
- max.y = Mathf.Max(max.y, block.nodeRect.center.y);
+ min.x = Mathf.Min(min.x, block._NodeRect.center.x);
+ min.y = Mathf.Min(min.y, block._NodeRect.center.y);
+ max.x = Mathf.Max(max.x, block._NodeRect.center.x);
+ max.y = Mathf.Max(max.y, block._NodeRect.center.y);
}
Vector2 center = (min + max) * -0.5f;
@@ -424,7 +426,7 @@ namespace Fungus
center.x += position.width * 0.5f;
center.y += position.height * 0.5f;
- flowchart.centerPosition = center;
+ flowchart.CenterPosition = center;
}
protected virtual void PanAndZoom(Flowchart flowchart)
@@ -454,7 +456,7 @@ namespace Fungus
if (drag)
{
- flowchart.scrollPos += Event.current.delta;
+ flowchart.ScrollPos += Event.current.delta;
forceRepaintCount = 6;
}
@@ -475,16 +477,16 @@ namespace Fungus
if (zoom)
{
- flowchart.zoom -= Event.current.delta.y * 0.01f;
- flowchart.zoom = Mathf.Clamp(flowchart.zoom, minZoomValue, maxZoomValue);
+ flowchart.Zoom -= Event.current.delta.y * 0.01f;
+ flowchart.Zoom = Mathf.Clamp(flowchart.Zoom, minZoomValue, maxZoomValue);
forceRepaintCount = 6;
}
}
protected virtual void DrawGrid(Flowchart flowchart)
{
- float width = this.position.width / flowchart.zoom;
- float height = this.position.height / flowchart.zoom;
+ float width = this.position.width / flowchart.Zoom;
+ float height = this.position.height / flowchart.Zoom;
// Match background color of scene view
if (EditorGUIUtility.isProSkin)
@@ -502,14 +504,14 @@ namespace Fungus
float gridSize = 128f;
- float x = flowchart.scrollPos.x % gridSize;
+ float x = flowchart.ScrollPos.x % gridSize;
while (x < width)
{
GLDraw.DrawLine(new Vector2(x, 0), new Vector2(x, height), color, 1f);
x += gridSize;
}
- float y = (flowchart.scrollPos.y % gridSize);
+ float y = (flowchart.ScrollPos.y % gridSize);
while (y < height)
{
if (y >= 0)
@@ -524,11 +526,11 @@ namespace Fungus
{
// Select the block and also select currently executing command
ShowBlockInspector(flowchart);
- flowchart.selectedBlock = block;
+ flowchart.SelectedBlock = block;
flowchart.ClearSelectedCommands();
- if (block.activeCommand != null)
+ if (block.ActiveCommand != null)
{
- flowchart.AddSelectedCommand(block.activeCommand);
+ flowchart.AddSelectedCommand(block.ActiveCommand);
}
}
@@ -537,7 +539,7 @@ namespace Fungus
Block newBlock = flowchart.CreateBlock(position);
Undo.RegisterCreatedObjectUndo(newBlock, "New Block");
ShowBlockInspector(flowchart);
- flowchart.selectedBlock = newBlock;
+ flowchart.SelectedBlock = newBlock;
flowchart.ClearSelectedCommands();
return newBlock;
@@ -545,7 +547,7 @@ namespace Fungus
protected virtual void DeleteBlock(Flowchart flowchart, Block block)
{
- foreach (Command command in block.commandList)
+ foreach (Command command in block.CommandList)
{
Undo.DestroyObjectImmediate(command);
}
@@ -574,8 +576,8 @@ namespace Fungus
Event.current.alt == false)
{
dragWindowId = windowId;
- startDragPosition.x = block.nodeRect.x;
- startDragPosition.y = block.nodeRect.y;
+ startDragPosition.x = block._NodeRect.x;
+ startDragPosition.y = block._NodeRect.y;
}
if (windowId < windowBlockMap.Count)
@@ -588,11 +590,11 @@ namespace Fungus
}
}
- bool selected = (flowchart.selectedBlock == block);
+ bool selected = (flowchart.SelectedBlock == block);
GUIStyle nodeStyleCopy = new GUIStyle(nodeStyle);
- if (block.eventHandler != null)
+ if (block._EventHandler != null)
{
nodeStyleCopy.normal.background = selected ? FungusEditorResources.texEventNodeOn : FungusEditorResources.texEventNodeOff;
}
@@ -624,17 +626,19 @@ namespace Fungus
nodeStyleCopy.normal.textColor = Color.black;
// Make sure node is wide enough to fit the node name text
- float width = nodeStyleCopy.CalcSize(new GUIContent(block.blockName)).x;
- block.nodeRect.width = Mathf.Max (block.nodeRect.width, width);
+ float width = nodeStyleCopy.CalcSize(new GUIContent(block.BlockName)).x;
+ Rect tempRect = block._NodeRect;
+ tempRect.width = Mathf.Max (block._NodeRect.width, width);
+ block._NodeRect = tempRect;
GUI.backgroundColor = Color.white;
- GUILayout.Box(block.blockName, nodeStyleCopy, GUILayout.Width(block.nodeRect.width), GUILayout.Height(block.nodeRect.height));
+ GUILayout.Box(block.BlockName, nodeStyleCopy, GUILayout.Width(block._NodeRect.width), GUILayout.Height(block._NodeRect.height));
- if (block.description.Length > 0)
+ if (block.Description.Length > 0)
{
GUIStyle descriptionStyle = new GUIStyle(EditorStyles.helpBox);
descriptionStyle.wordWrap = true;
- GUILayout.Label(block.description, descriptionStyle);
+ GUILayout.Label(block.Description, descriptionStyle);
}
if (Event.current.type == EventType.ContextClick)
@@ -657,9 +661,9 @@ namespace Fungus
List connectedBlocks = new List();
- bool blockIsSelected = (flowchart.selectedBlock == block);
+ bool blockIsSelected = (flowchart.SelectedBlock == block);
- foreach (Command command in block.commandList)
+ foreach (Command command in block.CommandList)
{
if (command == null)
{
@@ -667,7 +671,7 @@ namespace Fungus
}
bool commandIsSelected = false;
- foreach (Command selectedCommand in flowchart.selectedCommands)
+ foreach (Command selectedCommand in flowchart.SelectedCommands)
{
if (selectedCommand == command)
{
@@ -676,7 +680,7 @@ namespace Fungus
}
}
- bool highlight = command.isExecuting || (blockIsSelected && commandIsSelected);
+ bool highlight = command.IsExecuting || (blockIsSelected && commandIsSelected);
if (highlightedOnly && !highlight ||
!highlightedOnly && highlight)
@@ -696,13 +700,13 @@ namespace Fungus
continue;
}
- Rect startRect = new Rect(block.nodeRect);
- startRect.x += flowchart.scrollPos.x;
- startRect.y += flowchart.scrollPos.y;
+ Rect startRect = new Rect(block._NodeRect);
+ startRect.x += flowchart.ScrollPos.x;
+ startRect.y += flowchart.ScrollPos.y;
- Rect endRect = new Rect(blockB.nodeRect);
- endRect.x += flowchart.scrollPos.x;
- endRect.y += flowchart.scrollPos.y;
+ Rect endRect = new Rect(blockB._NodeRect);
+ endRect.x += flowchart.ScrollPos.x;
+ endRect.y += flowchart.ScrollPos.y;
DrawRectConnection(startRect, endRect, highlight);
}
@@ -769,18 +773,18 @@ namespace Fungus
Flowchart flowchart = GetFlowchart();
Block block = obj as Block;
- Vector2 newPosition = new Vector2(block.nodeRect.position.x +
- block.nodeRect.width + 20,
- block.nodeRect.y);
+ Vector2 newPosition = new Vector2(block._NodeRect.position.x +
+ block._NodeRect.width + 20,
+ block._NodeRect.y);
Block oldBlock = block;
Block newBlock = FlowchartWindow.CreateBlock(flowchart, newPosition);
- newBlock.blockName = flowchart.GetUniqueBlockKey(oldBlock.blockName + " (Copy)");
+ newBlock.BlockName = flowchart.GetUniqueBlockKey(oldBlock.BlockName + " (Copy)");
Undo.RecordObject(newBlock, "Duplicate Block");
- foreach (Command command in oldBlock.commandList)
+ foreach (Command command in oldBlock.CommandList)
{
if (ComponentUtility.CopyComponent(command))
{
@@ -790,8 +794,8 @@ namespace Fungus
Command pastedCommand = commands.Last();
if (pastedCommand != null)
{
- pastedCommand.itemId = flowchart.NextItemId();
- newBlock.commandList.Add (pastedCommand);
+ pastedCommand.ItemId = flowchart.NextItemId();
+ newBlock.CommandList.Add (pastedCommand);
}
}
@@ -800,9 +804,9 @@ namespace Fungus
}
}
- if (oldBlock.eventHandler != null)
+ if (oldBlock._EventHandler != null)
{
- if (ComponentUtility.CopyComponent(oldBlock.eventHandler))
+ if (ComponentUtility.CopyComponent(oldBlock._EventHandler))
{
if (ComponentUtility.PasteComponentAsNew(flowchart.gameObject))
{
@@ -810,8 +814,8 @@ namespace Fungus
EventHandler pastedEventHandler = eventHandlers.Last();
if (pastedEventHandler != null)
{
- pastedEventHandler.parentBlock = newBlock;
- newBlock.eventHandler = pastedEventHandler;
+ pastedEventHandler.ParentBlock = newBlock;
+ newBlock._EventHandler = pastedEventHandler;
}
}
}
@@ -833,9 +837,9 @@ namespace Fungus
EditorUtility.SetDirty(blockInspector);
}
- /**
- * Displays a temporary text alert in the center of the Flowchart window.
- */
+ ///
+ /// Displays a temporary text alert in the center of the Flowchart window.
+ ///
public static void ShowNotification(string notificationText)
{
EditorWindow window = EditorWindow.GetWindow(typeof(FlowchartWindow), false, "Flowchart");
diff --git a/Assets/Fungus/Flowchart/Editor/FungusEditorResources.cs b/Assets/Fungus/Flowchart/Editor/FungusEditorResources.cs
index ed8021ad..45ee4344 100644
--- a/Assets/Fungus/Flowchart/Editor/FungusEditorResources.cs
+++ b/Assets/Fungus/Flowchart/Editor/FungusEditorResources.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEditor;
@@ -9,7 +7,6 @@ using System;
namespace Fungus
{
-
internal static class FungusEditorResources
{
@@ -187,5 +184,4 @@ namespace Fungus
return (imageData[offset] << 8) | imageData[offset + 1];
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Editor/GLDraw.cs b/Assets/Fungus/Flowchart/Editor/GLDraw.cs
index e5d34937..0283e040 100644
--- a/Assets/Fungus/Flowchart/Editor/GLDraw.cs
+++ b/Assets/Fungus/Flowchart/Editor/GLDraw.cs
@@ -1,26 +1,21 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
-using System;
namespace Fungus
{
-
+ ///
+ /// Clipping code: http://forum.unity3d.com/threads/17066-How-to-draw-a-GUI-2D-quot-line-quot?p=230386#post230386
+ /// Thick line drawing code: http://unifycommunity.com/wiki/index.php?title=VectorLine
+ /// Credit: "http://cs-people.bu.edu/jalon/cs480/Oct11Lab/clip.c"
+ ///
public class GLDraw
{
- /*
- * Clipping code: http://forum.unity3d.com/threads/17066-How-to-draw-a-GUI-2D-quot-line-quot?p=230386#post230386
- * Thick line drawing code: http://unifycommunity.com/wiki/index.php?title=VectorLine
- */
protected static bool clippingEnabled;
protected static Rect clippingBounds;
public static Material lineMaterial = null;
- /* @ Credit: "http://cs-people.bu.edu/jalon/cs480/Oct11Lab/clip.c" */
protected static bool clip_test(float p, float q, ref float u1, ref float u2)
{
float r;
@@ -294,5 +289,4 @@ namespace Fungus
return rt * rt * rt * s + 3 * rt * rtt * st + 3 * rtt * t * et + t * t * t * e;
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Editor/IfEditor.cs b/Assets/Fungus/Flowchart/Editor/IfEditor.cs
index e6dafd73..9bcffefc 100644
--- a/Assets/Fungus/Flowchart/Editor/IfEditor.cs
+++ b/Assets/Fungus/Flowchart/Editor/IfEditor.cs
@@ -1,17 +1,12 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
using UnityEngine;
-using System.Collections;
using System.Collections.Generic;
-using System.Reflection;
namespace Fungus
{
-
[CustomEditor (typeof(If), true)]
public class IfEditor : CommandEditor
{
@@ -94,5 +89,4 @@ namespace Fungus
serializedObject.ApplyModifiedProperties();
}
}
-
}
diff --git a/Assets/Fungus/Flowchart/Editor/InvokeEventEditor.cs b/Assets/Fungus/Flowchart/Editor/InvokeEventEditor.cs
index 4e791e59..619306aa 100644
--- a/Assets/Fungus/Flowchart/Editor/InvokeEventEditor.cs
+++ b/Assets/Fungus/Flowchart/Editor/InvokeEventEditor.cs
@@ -1,12 +1,7 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
-using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
diff --git a/Assets/Fungus/Flowchart/Editor/InvokeMethodEditor.cs b/Assets/Fungus/Flowchart/Editor/InvokeMethodEditor.cs
index c654d5e2..ed45edd2 100644
--- a/Assets/Fungus/Flowchart/Editor/InvokeMethodEditor.cs
+++ b/Assets/Fungus/Flowchart/Editor/InvokeMethodEditor.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
@@ -10,11 +8,9 @@ using System.Linq;
using System.Reflection;
using System;
using System.Collections.Generic;
-using System.Text;
namespace Fungus
{
-
[CustomEditor(typeof(InvokeMethod))]
public class InvokeMethodEditor : CommandEditor
{
@@ -26,23 +22,23 @@ namespace Fungus
targetMethod = target as InvokeMethod;
- if (targetMethod == null || targetMethod.targetObject == null)
+ if (targetMethod == null || targetMethod.TargetObject == null)
return;
SerializedObject objSerializedTarget = new SerializedObject(targetMethod);
- string component = ShowComponents(objSerializedTarget, targetMethod.targetObject);
+ string component = ShowComponents(objSerializedTarget, targetMethod.TargetObject);
// show component methods if selected
if (!string.IsNullOrEmpty(component))
{
- var method = ShowMethods(objSerializedTarget, targetMethod.targetObject, component);
+ var method = ShowMethods(objSerializedTarget, targetMethod.TargetObject, component);
// show method parameters if selected
if (method != null)
{
objSerializedTarget.ApplyModifiedProperties();
- ShowParameters(objSerializedTarget, targetMethod.targetObject, method);
+ ShowParameters(objSerializedTarget, targetMethod.TargetObject, method);
ShowReturnValue(objSerializedTarget, method);
}
}
@@ -172,7 +168,7 @@ namespace Fungus
if (isDrawn)
{
- var vars = GetFungusVariablesByType(targetMethod.GetFlowchart().variables, objParam.ParameterType);
+ var vars = GetFungusVariablesByType(targetMethod.GetFlowchart().Variables, objParam.ParameterType);
var values = new string[] { "" };
var displayValue = values.Concat(vars).ToList();
@@ -241,7 +237,7 @@ namespace Fungus
if (saveReturnValueProp.boolValue)
{
- var vars = GetFungusVariablesByType(targetMethod.GetFlowchart().variables, method.ReturnType).ToList();
+ var vars = GetFungusVariablesByType(targetMethod.GetFlowchart().Variables, method.ReturnType).ToList();
int index = vars.IndexOf(returnValueKeyProp.stringValue);
index = EditorGUILayout.Popup(method.ReturnType.Name, index, vars.ToArray());
@@ -367,51 +363,51 @@ namespace Fungus
if (type == typeof(int))
{
- result = (from v in variables where v.GetType() == typeof(IntegerVariable) select v.key).ToArray();
+ result = (from v in variables where v.GetType() == typeof(IntegerVariable) select v.Key).ToArray();
}
else if (type == typeof(bool))
{
- result = (from v in variables where v.GetType() == typeof(BooleanVariable) select v.key).ToArray();
+ result = (from v in variables where v.GetType() == typeof(BooleanVariable) select v.Key).ToArray();
}
else if (type == typeof(float))
{
- result = (from v in variables where v.GetType() == typeof(FloatVariable) select v.key).ToArray();
+ result = (from v in variables where v.GetType() == typeof(FloatVariable) select v.Key).ToArray();
}
else if (type == typeof(string))
{
- result = (from v in variables where v.GetType() == typeof(StringVariable) select v.key).ToArray();
+ result = (from v in variables where v.GetType() == typeof(StringVariable) select v.Key).ToArray();
}
else if (type == typeof(Color))
{
- result = (from v in variables where v.GetType() == typeof(ColorVariable) select v.key).ToArray();
+ result = (from v in variables where v.GetType() == typeof(ColorVariable) select v.Key).ToArray();
}
else if (type == typeof(UnityEngine.GameObject))
{
- result = (from v in variables where v.GetType() == typeof(GameObjectVariable) select v.key).ToArray();
+ result = (from v in variables where v.GetType() == typeof(GameObjectVariable) select v.Key).ToArray();
}
else if (type == typeof(UnityEngine.Material))
{
- result = (from v in variables where v.GetType() == typeof(MaterialVariable) select v.key).ToArray();
+ result = (from v in variables where v.GetType() == typeof(MaterialVariable) select v.Key).ToArray();
}
else if (type == typeof(UnityEngine.Sprite))
{
- result = (from v in variables where v.GetType() == typeof(SpriteVariable) select v.key).ToArray();
+ result = (from v in variables where v.GetType() == typeof(SpriteVariable) select v.Key).ToArray();
}
else if (type == typeof(UnityEngine.Texture))
{
- result = (from v in variables where v.GetType() == typeof(TextureVariable) select v.key).ToArray();
+ result = (from v in variables where v.GetType() == typeof(TextureVariable) select v.Key).ToArray();
}
else if (type == typeof(UnityEngine.Vector2))
{
- result = (from v in variables where v.GetType() == typeof(Vector2Variable) select v.key).ToArray();
+ result = (from v in variables where v.GetType() == typeof(Vector2Variable) select v.Key).ToArray();
}
else if (type == typeof(UnityEngine.Vector3))
{
- result = (from v in variables where v.GetType() == typeof(Vector3Variable) select v.key).ToArray();
+ result = (from v in variables where v.GetType() == typeof(Vector3Variable) select v.Key).ToArray();
}
else if (type.IsSubclassOf(typeof(UnityEngine.Object)))
{
- result = (from v in variables where v.GetType() == typeof(ObjectVariable) select v.key).ToArray();
+ result = (from v in variables where v.GetType() == typeof(ObjectVariable) select v.Key).ToArray();
}
return result;
@@ -443,5 +439,4 @@ namespace Fungus
return null;
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Editor/LabelEditor.cs b/Assets/Fungus/Flowchart/Editor/LabelEditor.cs
index 3656e3c8..2ecedcfa 100644
--- a/Assets/Fungus/Flowchart/Editor/LabelEditor.cs
+++ b/Assets/Fungus/Flowchart/Editor/LabelEditor.cs
@@ -1,15 +1,9 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
-using UnityEditorInternal;
using UnityEngine;
-using System;
-using System.Collections;
using System.Collections.Generic;
-using System.Linq;
namespace Fungus
{
@@ -32,7 +26,7 @@ namespace Fungus
int index = 0;
int selectedIndex = 0;
- foreach (Command command in block.commandList)
+ foreach (Command command in block.CommandList)
{
Label label = command as Label;
if (label == null)
@@ -40,7 +34,7 @@ namespace Fungus
continue;
}
- labelKeys.Add(label.key);
+ labelKeys.Add(label.Key);
labelObjects.Add(label);
index++;
@@ -81,6 +75,5 @@ namespace Fungus
serializedObject.ApplyModifiedProperties();
}
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Editor/SetVariableEditor.cs b/Assets/Fungus/Flowchart/Editor/SetVariableEditor.cs
index c9dd38a4..ad761a86 100644
--- a/Assets/Fungus/Flowchart/Editor/SetVariableEditor.cs
+++ b/Assets/Fungus/Flowchart/Editor/SetVariableEditor.cs
@@ -1,11 +1,8 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
using UnityEngine;
-using System.Collections;
using System.Collections.Generic;
namespace Fungus
@@ -73,7 +70,7 @@ namespace Fungus
}
int selectedIndex = 0;
- switch (t.setOperator)
+ switch (t._SetOperator)
{
default:
case SetVariable.SetOperator.Assign:
@@ -159,5 +156,4 @@ namespace Fungus
serializedObject.ApplyModifiedProperties();
}
}
-
}
diff --git a/Assets/Fungus/Flowchart/Editor/VariableEditor.cs b/Assets/Fungus/Flowchart/Editor/VariableEditor.cs
index 9ed8e0b0..73ad21b3 100644
--- a/Assets/Fungus/Flowchart/Editor/VariableEditor.cs
+++ b/Assets/Fungus/Flowchart/Editor/VariableEditor.cs
@@ -1,13 +1,9 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
-using UnityEditorInternal;
using UnityEngine;
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Linq;
@@ -50,7 +46,7 @@ namespace Fungus
variableKeys.Add(defaultText);
variableObjects.Add(null);
- List variables = flowchart.variables;
+ List variables = flowchart.Variables;
int index = 0;
int selectedIndex = 0;
@@ -63,7 +59,7 @@ namespace Fungus
// occurs we just skip displaying the property for this frame.
if (selectedVariable != null &&
selectedVariable.gameObject != flowchart.gameObject &&
- selectedVariable.scope == VariableScope.Private)
+ selectedVariable.Scope == VariableScope.Private)
{
property.objectReferenceValue = null;
return;
@@ -79,7 +75,7 @@ namespace Fungus
}
}
- variableKeys.Add(v.key);
+ variableKeys.Add(v.Key);
variableObjects.Add(v);
index++;
@@ -109,7 +105,7 @@ namespace Fungus
}
}
- variableKeys.Add(fs.name + " / " + v.key);
+ variableKeys.Add(fs.name + " / " + v.Key);
variableObjects.Add(v);
index++;
diff --git a/Assets/Fungus/Flowchart/Editor/VariableListAdaptor.cs b/Assets/Fungus/Flowchart/Editor/VariableListAdaptor.cs
index 57421118..e3f7e290 100644
--- a/Assets/Fungus/Flowchart/Editor/VariableListAdaptor.cs
+++ b/Assets/Fungus/Flowchart/Editor/VariableListAdaptor.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
// Copyright (c) 2012-2013 Rotorz Limited. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
@@ -133,15 +131,15 @@ namespace Fungus
// Highlight if an active or selected command is referencing this variable
bool highlight = false;
- if (flowchart.selectedBlock != null)
+ if (flowchart.SelectedBlock != null)
{
- if (Application.isPlaying && flowchart.selectedBlock.IsExecuting())
+ if (Application.isPlaying && flowchart.SelectedBlock.IsExecuting())
{
- highlight = flowchart.selectedBlock.activeCommand.HasReference(variable);
+ highlight = flowchart.SelectedBlock.ActiveCommand.HasReference(variable);
}
- else if (!Application.isPlaying && flowchart.selectedCommands.Count > 0)
+ else if (!Application.isPlaying && flowchart.SelectedCommands.Count > 0)
{
- foreach (Command selectedCommand in flowchart.selectedCommands)
+ foreach (Command selectedCommand in flowchart.SelectedCommands)
{
if (selectedCommand == null)
{
@@ -163,8 +161,8 @@ namespace Fungus
GUI.Box(position, "");
}
- string key = variable.key;
- VariableScope scope = variable.scope;
+ string key = variable.Key;
+ VariableScope scope = variable.Scope;
// To access properties in a monobehavior, you have to new a SerializedObject
// http://answers.unity3d.com/questions/629803/findrelativeproperty-never-worked-for-me-how-does.html
@@ -174,7 +172,7 @@ namespace Fungus
GUI.Label(rects[0], variableInfo.VariableType);
- key = EditorGUI.TextField(rects[1], variable.key);
+ key = EditorGUI.TextField(rects[1], variable.Key);
SerializedProperty keyProp = variableObject.FindProperty("key");
keyProp.stringValue = flowchart.GetUniqueVariableKey(key, variable);
@@ -182,7 +180,7 @@ namespace Fungus
EditorGUI.PropertyField(rects[2], defaultProp, new GUIContent(""));
SerializedProperty scopeProp = variableObject.FindProperty("scope");
- scope = (VariableScope)EditorGUI.EnumPopup(rects[3], variable.scope);
+ scope = (VariableScope)EditorGUI.EnumPopup(rects[3], variable.Scope);
scopeProp.enumValueIndex = (int)scope;
variableObject.ApplyModifiedProperties();
diff --git a/Assets/Fungus/Flowchart/Scripts/Block.cs b/Assets/Fungus/Flowchart/Scripts/Block.cs
index 2dd8b26d..f2f9f80c 100644
--- a/Assets/Fungus/Flowchart/Scripts/Block.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Block.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -11,6 +9,9 @@ using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// A container for a sequence of Fungus comands.
+ ///
[ExecuteInEditMode]
[RequireComponent(typeof(Flowchart))]
[AddComponentMenu("")]
@@ -22,52 +23,72 @@ namespace Fungus
Executing,
}
- [NonSerialized]
- public ExecutionState executionState;
+ ///
+ /// The execution state of the Block.
+ ///
+ protected ExecutionState executionState;
+ public ExecutionState State { get { return executionState; } }
- [HideInInspector]
- public int itemId = -1; // Invalid flowchart item id
+ ///
+ /// Unique identifier for the Block.
+ ///
+ [SerializeField] protected int itemId = -1; // Invalid flowchart item id
+ public int ItemId { get { return itemId; } set { itemId = value; } }
+ ///
+ /// The name of the block node as displayed in the Flowchart window.
+ ///
[FormerlySerializedAs("sequenceName")]
[Tooltip("The name of the block node as displayed in the Flowchart window")]
- public string blockName = "New Block";
+ [SerializeField] protected string blockName = "New Block";
+ public string BlockName { get { return blockName; } set { blockName = value; } }
+ ///
+ /// Description text to display under the block node
+ ///
[TextArea(2, 5)]
[Tooltip("Description text to display under the block node")]
- public string description = "";
+ [SerializeField] protected string description = "";
+ public string Description { get { return description; } }
+ ///
+ /// An optional Event Handler which can execute the block when an event occurs.
+ ///
[Tooltip("An optional Event Handler which can execute the block when an event occurs")]
- public EventHandler eventHandler;
-
- [HideInInspector]
- [System.NonSerialized]
- public Command activeCommand;
+ [SerializeField] protected EventHandler eventHandler;
+ public EventHandler _EventHandler { get { return eventHandler; } set { eventHandler = value; } }
- // Index of last command executed before the current one
- // -1 indicates no previous command
- [HideInInspector]
- [System.NonSerialized]
- public int previousActiveCommandIndex = -1;
+ ///
+ /// The currently executing command.
+ ///
+ protected Command activeCommand;
+ public Command ActiveCommand { get { return activeCommand; } }
- [HideInInspector]
- [System.NonSerialized]
- public float executingIconTimer;
+ ///
+ // Index of last command executed before the current one.
+ // -1 indicates no previous command.
+ ///
+ protected int previousActiveCommandIndex = -1;
+ public float ExecutingIconTimer { get; set; }
- [HideInInspector]
- public List commandList = new List();
+ ///
+ /// The list of commands in the sequence.
+ ///
+ [SerializeField] protected List commandList = new List();
+ public List CommandList { get { return commandList; } }
- protected int executionCount;
+ ///
+ /// Controls the next command to execute in the block execution coroutine.
+ ///
+ protected int jumpToCommandIndex = -1;
+ public int JumpToCommandIndex { set { jumpToCommandIndex = value; } }
- /**
- * Duration of fade for executing icon displayed beside blocks & commands.
- */
+ ///
+ /// Duration of fade for executing icon displayed beside blocks & commands.
+ ///
public const float executingIconFadeTime = 0.5f;
- /**
- * Controls the next command to execute in the block execution coroutine.
- */
- [NonSerialized]
- public int jumpToCommandIndex = -1;
+ protected int executionCount;
protected bool executionInfoSet = false;
@@ -76,6 +97,9 @@ namespace Fungus
SetExecutionInfo();
}
+ ///
+ /// Populate the command metadata used to control execution.
+ ///
protected virtual void SetExecutionInfo()
{
// Give each child command a reference back to its parent block
@@ -88,8 +112,8 @@ namespace Fungus
continue;
}
- command.parentBlock = this;
- command.commandIndex = index++;
+ command.ParentBlock = this;
+ command.CommandIndex = index++;
}
// Ensure all commands are at their correct indent level
@@ -114,34 +138,30 @@ namespace Fungus
continue;
}
- command.commandIndex = index++;
+ command.CommandIndex = index++;
}
}
#endif
+ ///
+ /// Returns the parent Flowchart for this Block.
+ ///
public virtual Flowchart GetFlowchart()
{
return GetComponent();
}
- public virtual bool HasError()
- {
- foreach (Command command in commandList)
- {
- if (command.errorMessage.Length > 0)
- {
- return true;
- }
- }
-
- return false;
- }
-
+ ///
+ /// Returns true if the Block is executing a command.
+ ///
public virtual bool IsExecuting()
{
return (executionState == ExecutionState.Executing);
}
+ ///
+ /// Returns the number of times this Block has executed.
+ ///
public virtual int GetExecutionCount()
{
return executionCount;
@@ -179,7 +199,7 @@ namespace Fungus
#if UNITY_EDITOR
// Select the executing block & the first command
- flowchart.selectedBlock = this;
+ flowchart.SelectedBlock = this;
if (commandList.Count > 0)
{
flowchart.ClearSelectedCommands();
@@ -205,7 +225,7 @@ namespace Fungus
commandList[i].GetType() == typeof(Comment) ||
commandList[i].GetType() == typeof(Label)))
{
- i = commandList[i].commandIndex + 1;
+ i = commandList[i].CommandIndex + 1;
}
if (i >= commandList.Count)
@@ -220,7 +240,7 @@ namespace Fungus
}
else
{
- previousActiveCommandIndex = activeCommand.commandIndex;
+ previousActiveCommandIndex = activeCommand.CommandIndex;
}
Command command = commandList[i];
@@ -229,18 +249,18 @@ namespace Fungus
if (flowchart.gameObject.activeInHierarchy)
{
// Auto select a command in some situations
- if ((flowchart.selectedCommands.Count == 0 && i == 0) ||
- (flowchart.selectedCommands.Count == 1 && flowchart.selectedCommands[0].commandIndex == previousActiveCommandIndex))
+ if ((flowchart.SelectedCommands.Count == 0 && i == 0) ||
+ (flowchart.SelectedCommands.Count == 1 && flowchart.SelectedCommands[0].CommandIndex == previousActiveCommandIndex))
{
flowchart.ClearSelectedCommands();
flowchart.AddSelectedCommand(commandList[i]);
}
}
- command.isExecuting = true;
+ command.IsExecuting = true;
// This icon timer is managed by the FlowchartWindow class, but we also need to
// set it here in case a command starts and finishes execution before the next window update.
- command.executingIconTimer = Time.realtimeSinceStartup + executingIconFadeTime;
+ command.ExecutingIconTimer = Time.realtimeSinceStartup + executingIconFadeTime;
command.Execute();
// Wait until the executing command sets another command to jump to via Command.Continue()
@@ -250,13 +270,13 @@ namespace Fungus
}
#if UNITY_EDITOR
- if (flowchart.stepPause > 0f)
+ if (flowchart.StepPause > 0f)
{
- yield return new WaitForSeconds(flowchart.stepPause);
+ yield return new WaitForSeconds(flowchart.StepPause);
}
#endif
- command.isExecuting = false;
+ command.IsExecuting = false;
}
executionState = ExecutionState.Idle;
@@ -268,12 +288,15 @@ namespace Fungus
}
}
+ ///
+ /// Stop executing commands in this Block.
+ ///
public virtual void Stop()
{
// Tell the executing command to stop immediately
if (activeCommand != null)
{
- activeCommand.isExecuting = false;
+ activeCommand.IsExecuting = false;
activeCommand.OnStopExecuting();
}
@@ -281,6 +304,9 @@ namespace Fungus
jumpToCommandIndex = int.MaxValue;
}
+ ///
+ /// Returns a list of all Blocks connected to this one.
+ ///
public virtual List GetConnectedBlocks()
{
List connectedBlocks = new List();
@@ -294,6 +320,10 @@ namespace Fungus
return connectedBlocks;
}
+ ///
+ /// Returns the type of the previously executing command.
+ ///
+ /// The previous active command type.
public virtual System.Type GetPreviousActiveCommandType()
{
if (previousActiveCommandIndex >= 0 &&
@@ -305,6 +335,9 @@ namespace Fungus
return null;
}
+ ///
+ /// Recalculate the indent levels for all commands in the list.
+ ///
public virtual void UpdateIndentLevels()
{
int indentLevel = 0;
@@ -323,7 +356,7 @@ namespace Fungus
// Negative indent level is not permitted
indentLevel = Math.Max(indentLevel, 0);
- command.indentLevel = indentLevel;
+ command.IndentLevel = indentLevel;
if (command.OpenBlock())
{
diff --git a/Assets/Fungus/Flowchart/Scripts/Command.cs b/Assets/Fungus/Flowchart/Scripts/Command.cs
index 43bea187..39cac7c5 100644
--- a/Assets/Fungus/Flowchart/Scripts/Command.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Command.cs
@@ -1,26 +1,25 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
using System;
-using System.Collections;
using System.Collections.Generic;
namespace Fungus
-{
-
+{
+ ///
+ /// Attribute class for Fungus commands.
+ ///
public class CommandInfoAttribute : Attribute
{
- /**
- * Metadata atribute for the Command class.
- * @param category The category to place this command in.
- * @param commandName The display name of the command.
- * @param helpText Help information to display in the inspector.
- * @param priority If two command classes have the same name, the one with highest priority is listed. Negative priority removess the command from the list.
- */
+ ///
+ /// Metadata atribute for the Command class.
+ ///
+ /// The category to place this command in.
+ /// The display name of the command.
+ /// Help information to display in the inspector.
+ /// If two command classes have the same name, the one with highest priority is listed. Negative priority removess the command from the list.///
public CommandInfoAttribute(string category, string commandName, string helpText, int priority = 0)
{
this.Category = category;
@@ -35,41 +34,59 @@ namespace Fungus
public int Priority { get; set; }
}
+ ///
+ /// Base class for Commands. Commands can be added to Blocks to create an execution sequence.
+ ///
public class Command : MonoBehaviour
{
+ ///
+ /// Unique identifier for this command.
+ /// Unique for this Flowchart.
+ ///
[FormerlySerializedAs("commandId")]
[HideInInspector]
- public int itemId = -1; // Invalid flowchart item id
-
- [HideInInspector]
- public string errorMessage = "";
-
+ [SerializeField] protected int itemId = -1; // Invalid flowchart item id
+ public int ItemId { get { return itemId; } set { itemId = value; } }
+
+ ///
+ /// Error message to display in the command inspector.
+ ///
+ protected string errorMessage = "";
+ public string ErrorMessage { get { return errorMessage; } }
+
+ ///
+ /// Indent depth of the current commands.
+ /// Commands are indented inside If, While, etc. sections.
+ ///
[HideInInspector]
- public int indentLevel;
-
- [NonSerialized]
- public int commandIndex;
-
- /**
- * Set to true by the parent block while the command is executing.
- */
- [NonSerialized]
- public bool isExecuting;
-
- /**
- * Timer used to control appearance of executing icon in inspector.
- */
- [NonSerialized]
- public float executingIconTimer;
-
- /**
- * Reference to the Block object that this command belongs to.
- * This reference is only populated at runtime and in the editor when the
- * block is selected.
- */
- [NonSerialized]
- public Block parentBlock;
-
+ [SerializeField] protected int indentLevel;
+ public int IndentLevel { get { return indentLevel; } set { indentLevel = value; } }
+
+ ///
+ /// Index of the command in the parent block's command list.
+ ///
+ public int CommandIndex { get; set; }
+
+ ///
+ /// Set to true by the parent block while the command is executing.
+ ///
+ public bool IsExecuting { get; set; }
+
+ ///
+ /// Timer used to control appearance of executing icon in inspector.
+ ///
+ public float ExecutingIconTimer { get; set; }
+
+ ///
+ /// Reference to the Block object that this command belongs to.
+ /// This reference is only populated at runtime and in the editor when the
+ /// block is selected.
+ ///
+ public Block ParentBlock { get; set; }
+
+ ///
+ /// Returns the Flowchart that this command belongs to.
+ ///
public virtual Flowchart GetFlowchart()
{
Flowchart flowchart = GetComponent();
@@ -81,131 +98,167 @@ namespace Fungus
return flowchart;
}
+ ///
+ /// Execute the command.
+ ///
public virtual void Execute()
{
OnEnter();
}
+ ///
+ /// End execution of this command and continue execution at the next command.
+ ///
public virtual void Continue()
{
// This is a noop if the Block has already been stopped
- if (isExecuting)
+ if (IsExecuting)
{
- Continue(commandIndex + 1);
+ Continue(CommandIndex + 1);
}
}
+ ///
+ /// End execution of this command and continue execution at a specific command index.
+ ///
+ /// Next command index.
public virtual void Continue(int nextCommandIndex)
{
OnExit();
- if (parentBlock != null)
+ if (ParentBlock != null)
{
- parentBlock.jumpToCommandIndex = nextCommandIndex;
+ ParentBlock.JumpToCommandIndex = nextCommandIndex;
}
}
+ ///
+ /// Stops the parent Block executing.
+ ///
public virtual void StopParentBlock()
{
OnExit();
- if (parentBlock != null)
+ if (ParentBlock != null)
{
- parentBlock.Stop();
+ ParentBlock.Stop();
}
}
- /**
- * Called when the parent block has been requested to stop executing, and
- * this command is the currently executing command.
- * Use this callback to terminate any asynchronous operations and
- * cleanup state so that the command is ready to execute again later on.
- */
+ ///
+ /// Called when the parent block has been requested to stop executing, and
+ /// this command is the currently executing command.
+ /// Use this callback to terminate any asynchronous operations and
+ /// cleanup state so that the command is ready to execute again later on.
+ ///
public virtual void OnStopExecuting()
{}
- /**
- * Called when the new command is added to a block in the editor.
- */
+ ///
+ /// Called when the new command is added to a block in the editor.
+ ///
public virtual void OnCommandAdded(Block parentBlock)
{}
- /**
- * Called when the command is deleted from a block in the editor.
- */
+ ///
+ /// Called when the command is deleted from a block in the editor.
+ ///
public virtual void OnCommandRemoved(Block parentBlock)
{}
+ ///
+ /// Called when this command starts execution.
+ ///
public virtual void OnEnter()
{}
+ ///
+ /// Called when this command ends execution.
+ ///
public virtual void OnExit()
{}
+ ///
+ /// Called when this command is reset. This happens when the Reset command is used.
+ ///
public virtual void OnReset()
{}
+ ///
+ /// Populates a list with the Blocks that this command references.
+ ///
public virtual void GetConnectedBlocks(ref List connectedBlocks)
{}
+ ///
+ /// Returns true if this command references the variable.
+ /// Used to highlight variables in the variable list when a command is selected.
+ ///
public virtual bool HasReference(Variable variable)
{
return false;
}
+ ///
+ /// Returns the summary text to display in the command inspector.
+ ///
public virtual string GetSummary()
{
return "";
}
+ ///
+ /// Returns the help text to display for this command.
+ ///
public virtual string GetHelpText()
{
return "";
}
- /**
- * This command starts a block of commands.
- */
+ ///
+ /// Return true if this command opens a block of commands. Used for indenting commands.
+ ///
public virtual bool OpenBlock()
{
return false;
}
- /**
- * This command ends a block of commands.
- */
+ ///
+ /// Return true if this command closes a block of commands. Used for indenting commands.
+ ///
public virtual bool CloseBlock()
{
return false;
}
- /**
- * Return the color for the command background in inspector.
- */
+ ///
+ /// Return the color for the command background in inspector.
+ ///
+ /// The button color.
public virtual Color GetButtonColor()
{
return Color.white;
}
- /**
- * Returns true if the specified property should be displayed in the inspector.
- * This is useful for hiding certain properties based on the value of another property.
- */
+ ///
+ /// Returns true if the specified property should be displayed in the inspector.
+ /// This is useful for hiding certain properties based on the value of another property.
+ ///
public virtual bool IsPropertyVisible(string propertyName)
{
return true;
}
- /**
- * Returns true if the specified property should be displayed as a reorderable list in the inspector.
- * This only applies for array properties and has no effect for non-array properties.
- */
+ ///
+ /// Returns true if the specified property should be displayed as a reorderable list in the inspector.
+ /// This only applies for array properties and has no effect for non-array properties.
+ ///
public virtual bool IsReorderableArray(string propertyName)
{
return false;
}
- /**
- * Returns the localization id for the Flowchart that contains this command.
- */
+ ///
+ /// Returns the localization id for the Flowchart that contains this command.
+ ///
public virtual string GetFlowchartLocalizationId()
{
// If no localization id has been set then use the Flowchart name
@@ -215,7 +268,7 @@ namespace Fungus
return "";
}
- string localizationId = GetFlowchart().localizationId;
+ string localizationId = GetFlowchart().LocalizationId;
if (localizationId.Length == 0)
{
localizationId = flowchart.name;
@@ -223,7 +276,5 @@ namespace Fungus
return localizationId;
}
-
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/CommandCopyBuffer.cs b/Assets/Fungus/Flowchart/Scripts/CommandCopyBuffer.cs
index 461c5c79..b49c4fe1 100644
--- a/Assets/Fungus/Flowchart/Scripts/CommandCopyBuffer.cs
+++ b/Assets/Fungus/Flowchart/Scripts/CommandCopyBuffer.cs
@@ -1,23 +1,22 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
-
+ ///
+ /// Temporary buffer object used when copying and pasting commands.
+ ///
[AddComponentMenu("")]
public class CommandCopyBuffer : Block
{
protected static CommandCopyBuffer instance;
- /**
- * Returns the CommandCopyBuffer singleton instance.
- * Will create a CommandCopyBuffer game object if none currently exists.
- */
+ ///
+ /// Returns the CommandCopyBuffer singleton instance.
+ /// Will create a CommandCopyBuffer game object if none currently exists.
+ ///
static public CommandCopyBuffer GetInstance()
{
if (instance == null)
@@ -67,5 +66,4 @@ namespace Fungus
}
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Break.cs b/Assets/Fungus/Flowchart/Scripts/Commands/Break.cs
index a130a336..433d4bee 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/Break.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/Break.cs
@@ -1,15 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Force a loop to terminate immediately.
+ ///
[CommandInfo("Flow",
"Break",
"Force a loop to terminate immediately.")]
@@ -21,13 +19,13 @@ namespace Fungus
// Find index of previous while command
int whileIndex = -1;
int whileIndentLevel = -1;
- for (int i = commandIndex - 1; i >=0; --i)
+ for (int i = CommandIndex - 1; i >=0; --i)
{
- While whileCommand = parentBlock.commandList[i] as While;
+ While whileCommand = ParentBlock.CommandList[i] as While;
if (whileCommand != null)
{
whileIndex = i;
- whileIndentLevel = whileCommand.indentLevel;
+ whileIndentLevel = whileCommand.IndentLevel;
break;
}
}
@@ -40,18 +38,18 @@ namespace Fungus
}
// Find matching End statement at same indent level as While
- for (int i = whileIndex + 1; i < parentBlock.commandList.Count; ++i)
+ for (int i = whileIndex + 1; i < ParentBlock.CommandList.Count; ++i)
{
- End endCommand = parentBlock.commandList[i] as End;
+ End endCommand = ParentBlock.CommandList[i] as End;
if (endCommand != null &&
- endCommand.indentLevel == whileIndentLevel)
+ endCommand.IndentLevel == whileIndentLevel)
{
// Sanity check that break command is actually between the While and End commands
- if (commandIndex > whileIndex && commandIndex < endCommand.commandIndex)
+ if (CommandIndex > whileIndex && CommandIndex < endCommand.CommandIndex)
{
// Continue at next command after End
- Continue (endCommand.commandIndex + 1);
+ Continue (endCommand.CommandIndex + 1);
return;
}
else
@@ -69,6 +67,5 @@ namespace Fungus
{
return new Color32(253, 253, 150, 255);
}
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Call.cs b/Assets/Fungus/Flowchart/Scripts/Commands/Call.cs
index 85e0f226..e3670414 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/Call.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/Call.cs
@@ -1,17 +1,16 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System.Collections;
using System.Collections.Generic;
using System;
namespace Fungus
{
-
+ ///
+ /// Execute another block in the same Flowchart as the command, or in a different Flowchart.
+ ///
[CommandInfo("Flow",
"Call",
"Execute another block in the same Flowchart as the command, or in a different Flowchart.")]
@@ -19,15 +18,15 @@ namespace Fungus
public class Call : Command
{
[Tooltip("Flowchart which contains the block to execute. If none is specified then the current Flowchart is used.")]
- public Flowchart targetFlowchart;
+ [SerializeField] protected Flowchart targetFlowchart;
[FormerlySerializedAs("targetSequence")]
[Tooltip("Block to start executing")]
- public Block targetBlock;
+ [SerializeField] protected Block targetBlock;
[Tooltip("Command index to start executing")]
[FormerlySerializedAs("commandIndex")]
- public int startIndex;
+ [SerializeField] protected int startIndex;
public enum CallMode
{
@@ -37,7 +36,7 @@ namespace Fungus
}
[Tooltip("Select if the calling block should stop or continue executing commands, or wait until the called block finishes.")]
- public CallMode callMode;
+ [SerializeField] protected CallMode callMode;
public override void OnEnter()
{
@@ -46,7 +45,7 @@ namespace Fungus
if (targetBlock != null)
{
// Check if calling your own parent block
- if (targetBlock == parentBlock)
+ if (targetBlock == ParentBlock)
{
// Just ignore the callmode in this case, and jump to first command in list
Continue(0);
@@ -58,7 +57,7 @@ namespace Fungus
if (callMode == CallMode.WaitUntilFinished)
{
onComplete = delegate {
- flowchart.selectedBlock = parentBlock;
+ flowchart.SelectedBlock = ParentBlock;
Continue();
};
}
@@ -68,9 +67,9 @@ namespace Fungus
{
// If the executing block is currently selected then follow the execution
// onto the next block in the inspector.
- if (flowchart.selectedBlock == parentBlock)
+ if (flowchart.SelectedBlock == ParentBlock)
{
- flowchart.selectedBlock = targetBlock;
+ flowchart.SelectedBlock = targetBlock;
}
StartCoroutine(targetBlock.Execute(startIndex, onComplete));
@@ -110,7 +109,7 @@ namespace Fungus
}
else
{
- summary = targetBlock.blockName;
+ summary = targetBlock.BlockName;
}
switch (callMode)
@@ -134,5 +133,4 @@ namespace Fungus
return new Color32(235, 191, 217, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/CallMethod.cs b/Assets/Fungus/Flowchart/Scripts/Commands/CallMethod.cs
index c3771fa2..4a0f096a 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/CallMethod.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/CallMethod.cs
@@ -1,16 +1,15 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
- // This command is called "Call Method" because a) it's more descriptive than Send Message and we're already have
- // a Send Message command for sending messages to trigger block execution.
-
+ ///
+ /// Calls a named method on a GameObject using the GameObject.SendMessage() system.
+ /// This command is called "Call Method" because a) it's more descriptive than Send Message and we're already have
+ /// a Send Message command for sending messages to trigger block execution.
+ ///
[CommandInfo("Scripting",
"Call Method",
"Calls a named method on a GameObject using the GameObject.SendMessage() system.")]
@@ -18,13 +17,13 @@ namespace Fungus
public class CallMethod : Command
{
[Tooltip("Target monobehavior which contains the method we want to call")]
- public GameObject targetObject;
+ [SerializeField] protected GameObject targetObject;
[Tooltip("Name of the method to call")]
- public string methodName = "";
+ [SerializeField] protected string methodName = "";
[Tooltip("Delay (in seconds) before the method will be called")]
- public float delay;
+ [SerializeField] protected float delay;
public override void OnEnter()
{
@@ -72,5 +71,4 @@ namespace Fungus
return new Color32(235, 191, 217, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Comment.cs b/Assets/Fungus/Flowchart/Scripts/Commands/Comment.cs
index 8017fb48..75cdd439 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/Comment.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/Comment.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Use comments to record design notes and reminders about your game.
+ ///
[CommandInfo("",
"Comment",
"Use comments to record design notes and reminders about your game.")]
@@ -16,11 +15,11 @@ namespace Fungus
public class Comment : Command
{
[Tooltip("Name of Commenter")]
- public string commenterName = "";
+ [SerializeField] protected string commenterName = "";
[Tooltip("Text to display for this comment")]
[TextArea(2,4)]
- public string commentText = "";
+ [SerializeField] protected string commentText = "";
public override void OnEnter()
{
@@ -41,5 +40,4 @@ namespace Fungus
return new Color32(220, 220, 220, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Condition.cs b/Assets/Fungus/Flowchart/Scripts/Commands/Condition.cs
index 50b2030c..d785b610 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/Condition.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/Condition.cs
@@ -1,11 +1,7 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
@@ -23,7 +19,7 @@ namespace Fungus
public abstract class Condition : Command
{
[Tooltip("The type of comparison to be performed")]
- public CompareOperator compareOperator;
+ [SerializeField] protected CompareOperator compareOperator;
public static string GetOperatorDescription(CompareOperator compareOperator)
{
@@ -53,5 +49,4 @@ namespace Fungus
return summary;
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/DebugLog.cs b/Assets/Fungus/Flowchart/Scripts/Commands/DebugLog.cs
index 2232cdc8..f5b8979d 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/DebugLog.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/DebugLog.cs
@@ -1,13 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Writes a log message to the debug console.
+ ///
[CommandInfo("Scripting",
"Debug Log",
"Writes a log message to the debug console.")]
@@ -22,10 +22,10 @@ namespace Fungus
}
[Tooltip("Display type of debug log info")]
- public DebugLogType logType;
+ [SerializeField] protected DebugLogType logType;
[Tooltip("Text to write to the debug log. Supports variable substitution, e.g. {$Myvar}")]
- public StringDataMulti logMessage;
+ [SerializeField] protected StringDataMulti logMessage;
public override void OnEnter ()
{
@@ -58,5 +58,4 @@ namespace Fungus
return new Color32(235, 191, 217, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/DeleteSaveKey.cs b/Assets/Fungus/Flowchart/Scripts/Commands/DeleteSaveKey.cs
index d10c7489..c7c3c122 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/DeleteSaveKey.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/DeleteSaveKey.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Deletes a saved value from permanent storage.
+ ///
[CommandInfo("Variable",
"Delete Save Key",
"Deletes a saved value from permanent storage.")]
@@ -16,7 +15,7 @@ namespace Fungus
public class DeleteSaveKey : Command
{
[Tooltip("Name of the saved value. Supports variable substition e.g. \"player_{$PlayerNumber}")]
- public string key = "";
+ [SerializeField] protected string key = "";
public override void OnEnter()
{
@@ -50,6 +49,5 @@ namespace Fungus
{
return new Color32(235, 191, 217, 255);
}
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Destroy.cs b/Assets/Fungus/Flowchart/Scripts/Commands/Destroy.cs
index 99f6daa2..9a50d81b 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/Destroy.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/Destroy.cs
@@ -1,15 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Destroys a specified game object in the scene.
+ ///
[CommandInfo("Scripting",
"Destroy",
"Destroys a specified game object in the scene.")]
@@ -18,7 +17,7 @@ namespace Fungus
public class Destroy : Command
{
[Tooltip("Reference to game object to destroy")]
- public GameObjectData _targetGameObject;
+ [SerializeField] protected GameObjectData _targetGameObject;
public override void OnEnter()
{
@@ -60,5 +59,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Else.cs b/Assets/Fungus/Flowchart/Scripts/Commands/Else.cs
index 6957f23e..0bbc3c57 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/Else.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/Else.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Marks the start of a command block to be executed when the preceding If statement is False.
+ ///
[CommandInfo("Flow",
"Else",
"Marks the start of a command block to be executed when the preceding If statement is False.")]
@@ -17,13 +16,13 @@ namespace Fungus
{
public override void OnEnter()
{
- if (parentBlock == null)
+ if (ParentBlock == null)
{
return;
}
// Stop if this is the last command in the list
- if (commandIndex >= parentBlock.commandList.Count - 1)
+ if (CommandIndex >= ParentBlock.CommandList.Count - 1)
{
StopParentBlock();
return;
@@ -31,17 +30,17 @@ namespace Fungus
// Find the next End command at the same indent level as this Else command
int indent = indentLevel;
- for (int i = commandIndex + 1; i < parentBlock.commandList.Count; ++i)
+ for (int i = CommandIndex + 1; i < ParentBlock.CommandList.Count; ++i)
{
- Command command = parentBlock.commandList[i];
+ Command command = ParentBlock.CommandList[i];
- if (command.indentLevel == indent)
+ if (command.IndentLevel == indent)
{
System.Type type = command.GetType();
if (type == typeof(End))
{
// Execute command immediately after the EndIf command
- Continue(command.commandIndex + 1);
+ Continue(command.CommandIndex + 1);
return;
}
}
@@ -66,5 +65,4 @@ namespace Fungus
return new Color32(253, 253, 150, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/ElseIf.cs b/Assets/Fungus/Flowchart/Scripts/Commands/ElseIf.cs
index 579c749d..d41c0590 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/ElseIf.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/ElseIf.cs
@@ -1,26 +1,22 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
-using System;
namespace Fungus
{
-
+ ///
+ /// Marks the start of a command block to be executed when the preceding If statement is False and the test expression is true.
+ ///
[CommandInfo("Flow",
"Else If",
"Marks the start of a command block to be executed when the preceding If statement is False and the test expression is true.")]
[AddComponentMenu("")]
public class ElseIf : If
{
-
public override void OnEnter()
{
- System.Type previousCommandType = parentBlock.GetPreviousActiveCommandType();
+ System.Type previousCommandType = ParentBlock.GetPreviousActiveCommandType();
if (previousCommandType == typeof(If) ||
previousCommandType == typeof(ElseIf) )
@@ -34,7 +30,7 @@ namespace Fungus
// but will also jump to a following Else command.
// Stop if this is the last command in the list
- if (commandIndex >= parentBlock.commandList.Count - 1)
+ if (CommandIndex >= ParentBlock.CommandList.Count - 1)
{
StopParentBlock();
return;
@@ -42,17 +38,17 @@ namespace Fungus
// Find the next End command at the same indent level as this Else If command
int indent = indentLevel;
- for (int i = commandIndex + 1; i < parentBlock.commandList.Count; ++i)
+ for (int i = CommandIndex + 1; i < ParentBlock.CommandList.Count; ++i)
{
- Command command = parentBlock.commandList[i];
+ Command command = ParentBlock.CommandList[i];
- if (command.indentLevel == indent)
+ if (command.IndentLevel == indent)
{
System.Type type = command.GetType();
if (type == typeof(End))
{
// Execute command immediately after the Else or End command
- Continue(command.commandIndex + 1);
+ Continue(command.CommandIndex + 1);
return;
}
}
@@ -78,5 +74,4 @@ namespace Fungus
return new Color32(253, 253, 150, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/End.cs b/Assets/Fungus/Flowchart/Scripts/Commands/End.cs
index 48ae0643..baa28034 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/End.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/End.cs
@@ -1,31 +1,28 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Marks the end of a conditional block.
+ ///
[CommandInfo("Flow",
"End",
"Marks the end of a conditional block.")]
[AddComponentMenu("")]
public class End : Command
{
- [NonSerialized]
- public bool loop = false;
+ public bool Loop { get; set; }
public override void OnEnter()
{
- if (loop)
+ if (Loop)
{
- for (int i = commandIndex - 1; i >= 0; --i)
+ for (int i = CommandIndex - 1; i >= 0; --i)
{
- System.Type commandType = parentBlock.commandList[i].GetType();
+ System.Type commandType = ParentBlock.CommandList[i].GetType();
if (commandType == typeof(While))
{
Continue(i);
@@ -47,5 +44,4 @@ namespace Fungus
return new Color32(253, 253, 150, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/If.cs b/Assets/Fungus/Flowchart/Scripts/Commands/If.cs
index 66c3ad73..81e4dffe 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/If.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/If.cs
@@ -1,15 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
-
+ ///
+ /// If the test expression is true, execute the following command block.
+ ///
[CommandInfo("Flow",
"If",
"If the test expression is true, execute the following command block.")]
@@ -21,23 +19,23 @@ namespace Fungus
typeof(IntegerVariable),
typeof(FloatVariable),
typeof(StringVariable))]
- public Variable variable;
+ [SerializeField] protected Variable variable;
[Tooltip("Boolean value to compare against")]
- public BooleanData booleanData;
+ [SerializeField] protected BooleanData booleanData;
[Tooltip("Integer value to compare against")]
- public IntegerData integerData;
+ [SerializeField] protected IntegerData integerData;
[Tooltip("Float value to compare against")]
- public FloatData floatData;
+ [SerializeField] protected FloatData floatData;
[Tooltip("String value to compare against")]
- public StringDataMulti stringData;
+ [SerializeField] protected StringDataMulti stringData;
public override void OnEnter()
{
- if (parentBlock == null)
+ if (ParentBlock == null)
{
return;
}
@@ -100,16 +98,16 @@ namespace Fungus
protected virtual void OnFalse()
{
// Last command in block
- if (commandIndex >= parentBlock.commandList.Count)
+ if (CommandIndex >= ParentBlock.CommandList.Count)
{
StopParentBlock();
return;
}
// Find the next Else, ElseIf or End command at the same indent level as this If command
- for (int i = commandIndex + 1; i < parentBlock.commandList.Count; ++i)
+ for (int i = CommandIndex + 1; i < ParentBlock.CommandList.Count; ++i)
{
- Command nextCommand = parentBlock.commandList[i];
+ Command nextCommand = ParentBlock.CommandList[i];
if (nextCommand == null)
{
@@ -121,7 +119,7 @@ namespace Fungus
if (!nextCommand.enabled ||
nextCommand.GetType() == typeof(Comment) ||
nextCommand.GetType() == typeof(Label) ||
- nextCommand.indentLevel != indentLevel)
+ nextCommand.IndentLevel != indentLevel)
{
continue;
}
@@ -130,7 +128,7 @@ namespace Fungus
if (type == typeof(Else) ||
type == typeof(End))
{
- if (i >= parentBlock.commandList.Count - 1)
+ if (i >= ParentBlock.CommandList.Count - 1)
{
// Last command in Block, so stop
StopParentBlock();
@@ -138,7 +136,7 @@ namespace Fungus
else
{
// Execute command immediately after the Else or End command
- Continue(nextCommand.commandIndex + 1);
+ Continue(nextCommand.CommandIndex + 1);
return;
}
}
@@ -162,7 +160,7 @@ namespace Fungus
return "Error: No variable selected";
}
- string summary = variable.key + " ";
+ string summary = variable.Key + " ";
summary += Condition.GetOperatorDescription(compareOperator) + " ";
if (variable.GetType() == typeof(BooleanVariable))
@@ -200,5 +198,4 @@ namespace Fungus
return new Color32(253, 253, 150, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/InvokeEvent.cs b/Assets/Fungus/Flowchart/Scripts/Commands/InvokeEvent.cs
index 0ef10fd7..43d1c2aa 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/InvokeEvent.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/InvokeEvent.cs
@@ -1,23 +1,22 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
using System;
using UnityEngine.Events;
namespace Fungus
{
+ ///
+ /// Calls a list of component methods via the Unity Event System (as used in the Unity UI)
+ /// This command is more efficient than the Invoke Method command but can only pass a single parameter and doesn't support return values.
+ /// This command uses the UnityEvent system to call methods in script. http://docs.unity3d.com/Manual/UnityEvents.html
+ ///
[CommandInfo("Scripting",
"Invoke Event",
"Calls a list of component methods via the Unity Event System (as used in the Unity UI). " +
"This command is more efficient than the Invoke Method command but can only pass a single parameter and doesn't support return values.")]
[AddComponentMenu("")]
-
- // This command uses the UnityEvent system to call methods in script.
- // http://docs.unity3d.com/Manual/UnityEvents.html
public class InvokeEvent : Command
{
[Serializable] public class BooleanEvent : UnityEvent {}
@@ -35,36 +34,36 @@ namespace Fungus
}
[Tooltip("Delay (in seconds) before the methods will be called")]
- public float delay;
+ [SerializeField] protected float delay;
- public InvokeType invokeType;
+ [SerializeField] protected InvokeType invokeType;
[Tooltip("List of methods to call. Supports methods with no parameters or exactly one string, int, float or object parameter.")]
- public UnityEvent staticEvent = new UnityEvent();
+ [SerializeField] protected UnityEvent staticEvent = new UnityEvent();
[Tooltip("Boolean parameter to pass to the invoked methods.")]
- public BooleanData booleanParameter;
+ [SerializeField] protected BooleanData booleanParameter;
[Tooltip("List of methods to call. Supports methods with one boolean parameter.")]
- public BooleanEvent booleanEvent = new BooleanEvent();
+ [SerializeField] protected BooleanEvent booleanEvent = new BooleanEvent();
[Tooltip("Integer parameter to pass to the invoked methods.")]
- public IntegerData integerParameter;
+ [SerializeField] protected IntegerData integerParameter;
[Tooltip("List of methods to call. Supports methods with one integer parameter.")]
- public IntegerEvent integerEvent = new IntegerEvent();
+ [SerializeField] protected IntegerEvent integerEvent = new IntegerEvent();
[Tooltip("Float parameter to pass to the invoked methods.")]
- public FloatData floatParameter;
+ [SerializeField] protected FloatData floatParameter;
[Tooltip("List of methods to call. Supports methods with one float parameter.")]
- public FloatEvent floatEvent = new FloatEvent();
+ [SerializeField] protected FloatEvent floatEvent = new FloatEvent();
[Tooltip("String parameter to pass to the invoked methods.")]
- public StringDataMulti stringParameter;
+ [SerializeField] protected StringDataMulti stringParameter;
[Tooltip("List of methods to call. Supports methods with one string parameter.")]
- public StringEvent stringEvent = new StringEvent();
+ [SerializeField] protected StringEvent stringEvent = new StringEvent();
public override void OnEnter()
{
@@ -89,16 +88,16 @@ namespace Fungus
staticEvent.Invoke();
break;
case InvokeType.DynamicBoolean:
- booleanEvent.Invoke(booleanParameter);
+ booleanEvent.Invoke(booleanParameter.Value);
break;
case InvokeType.DynamicInteger:
- integerEvent.Invoke(integerParameter);
+ integerEvent.Invoke(integerParameter.Value);
break;
case InvokeType.DynamicFloat:
- floatEvent.Invoke(floatParameter);
+ floatEvent.Invoke(floatParameter.Value);
break;
case InvokeType.DynamicString:
- stringEvent.Invoke(stringParameter);
+ stringEvent.Invoke(stringParameter.Value);
break;
}
}
@@ -135,5 +134,4 @@ namespace Fungus
return new Color32(235, 191, 217, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/InvokeMethod.cs b/Assets/Fungus/Flowchart/Scripts/Commands/InvokeMethod.cs
index bbc9e099..998bbaa5 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/InvokeMethod.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/InvokeMethod.cs
@@ -1,12 +1,9 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
using System.Reflection;
-using System.Linq;
using System.Collections.Generic;
using System;
using UnityEngine.Events;
@@ -14,58 +11,62 @@ using MarkerMetro.Unity.WinLegacy.Reflection;
namespace Fungus
{
-
+ ///
+ /// Invokes a method of a component via reflection. Supports passing multiple parameters and storing returned values in a Fungus variable.
+ ///
[CommandInfo("Scripting",
- "Invoke Method",
- "Invokes a method of a component via reflection. Supports passing multiple parameters and storing returned values in a Fungus variable.")]
+ "Invoke Method",
+ "Invokes a method of a component via reflection. Supports passing multiple parameters and storing returned values in a Fungus variable.")]
public class InvokeMethod : Command
{
[Tooltip("GameObject containing the component method to be invoked")]
- public GameObject targetObject;
+ [SerializeField] protected GameObject targetObject;
+
+ public GameObject TargetObject { get { return targetObject; } }
[HideInInspector]
[Tooltip("Name of assembly containing the target component")]
- public string targetComponentAssemblyName;
+ [SerializeField] protected string targetComponentAssemblyName;
[HideInInspector]
[Tooltip("Full name of the target component")]
- public string targetComponentFullname;
+ [SerializeField] protected string targetComponentFullname;
[HideInInspector]
[Tooltip("Display name of the target component")]
- public string targetComponentText;
+ [SerializeField] protected string targetComponentText;
[HideInInspector]
[Tooltip("Name of target method to invoke on the target component")]
- public string targetMethod;
+ [SerializeField] protected string targetMethod;
[HideInInspector]
[Tooltip("Display name of target method to invoke on the target component")]
- public string targetMethodText;
+ [SerializeField] protected string targetMethodText;
[HideInInspector]
[Tooltip("List of parameters to pass to the invoked method")]
- public InvokeMethodParameter[] methodParameters;
+ [SerializeField] protected InvokeMethodParameter[] methodParameters;
[HideInInspector]
[Tooltip("If true, store the return value in a flowchart variable of the same type.")]
- public bool saveReturnValue;
+ [SerializeField] protected bool saveReturnValue;
[HideInInspector]
[Tooltip("Name of Fungus variable to store the return value in")]
- public string returnValueVariableKey;
+ [SerializeField] protected string returnValueVariableKey;
[HideInInspector]
[Tooltip("The type of the return value")]
- public string returnValueType;
+ [SerializeField] protected string returnValueType;
[HideInInspector]
[Tooltip("If true, list all inherited methods for the component")]
- public bool showInherited;
+ [SerializeField] protected bool showInherited;
[HideInInspector]
[Tooltip("The coroutine call behavior for methods that return IEnumerator")]
- public Fungus.Call.CallMode callMode;
+ [SerializeField] protected Call.CallMode callMode;
protected Type componentType;
protected Component objComponent;
@@ -198,62 +199,62 @@ namespace Fungus
case "System.Int32":
var intvalue = flowChart.GetVariable(item.variableKey);
if (intvalue != null)
- objValue = intvalue.value;
+ objValue = intvalue.Value;
break;
case "System.Boolean":
var boolean = flowChart.GetVariable(item.variableKey);
if (boolean != null)
- objValue = boolean.value;
+ objValue = boolean.Value;
break;
case "System.Single":
var floatvalue = flowChart.GetVariable(item.variableKey);
if (floatvalue != null)
- objValue = floatvalue.value;
+ objValue = floatvalue.Value;
break;
case "System.String":
var stringvalue = flowChart.GetVariable(item.variableKey);
if (stringvalue != null)
- objValue = stringvalue.value;
+ objValue = stringvalue.Value;
break;
case "UnityEngine.Color":
var color = flowChart.GetVariable(item.variableKey);
if (color != null)
- objValue = color.value;
+ objValue = color.Value;
break;
case "UnityEngine.GameObject":
var gameObject = flowChart.GetVariable(item.variableKey);
if (gameObject != null)
- objValue = gameObject.value;
+ objValue = gameObject.Value;
break;
case "UnityEngine.Material":
var material = flowChart.GetVariable(item.variableKey);
if (material != null)
- objValue = material.value;
+ objValue = material.Value;
break;
case "UnityEngine.Sprite":
var sprite = flowChart.GetVariable(item.variableKey);
if (sprite != null)
- objValue = sprite.value;
+ objValue = sprite.Value;
break;
case "UnityEngine.Texture":
var texture = flowChart.GetVariable(item.variableKey);
if (texture != null)
- objValue = texture.value;
+ objValue = texture.Value;
break;
case "UnityEngine.Vector2":
var vector2 = flowChart.GetVariable(item.variableKey);
if (vector2 != null)
- objValue = vector2.value;
+ objValue = vector2.Value;
break;
case "UnityEngine.Vector3":
var vector3 = flowChart.GetVariable(item.variableKey);
if (vector3 != null)
- objValue = vector3.value;
+ objValue = vector3.Value;
break;
default:
var obj = flowChart.GetVariable(item.variableKey);
if (obj != null)
- objValue = obj.value;
+ objValue = obj.Value;
break;
}
@@ -271,40 +272,40 @@ namespace Fungus
switch (returnType)
{
case "System.Int32":
- flowChart.GetVariable(key).value = (int)value;
+ flowChart.GetVariable(key).Value = (int)value;
break;
case "System.Boolean":
- flowChart.GetVariable(key).value = (bool)value;
+ flowChart.GetVariable(key).Value = (bool)value;
break;
case "System.Single":
- flowChart.GetVariable(key).value = (float)value;
+ flowChart.GetVariable(key).Value = (float)value;
break;
case "System.String":
- flowChart.GetVariable(key).value = (string)value;
+ flowChart.GetVariable(key).Value = (string)value;
break;
case "UnityEngine.Color":
- flowChart.GetVariable(key).value = (UnityEngine.Color)value;
+ flowChart.GetVariable(key).Value = (UnityEngine.Color)value;
break;
case "UnityEngine.GameObject":
- flowChart.GetVariable(key).value = (UnityEngine.GameObject)value;
+ flowChart.GetVariable(key).Value = (UnityEngine.GameObject)value;
break;
case "UnityEngine.Material":
- flowChart.GetVariable(key).value = (UnityEngine.Material)value;
+ flowChart.GetVariable(key).Value = (UnityEngine.Material)value;
break;
case "UnityEngine.Sprite":
- flowChart.GetVariable(key).value = (UnityEngine.Sprite)value;
+ flowChart.GetVariable(key).Value = (UnityEngine.Sprite)value;
break;
case "UnityEngine.Texture":
- flowChart.GetVariable(key).value = (UnityEngine.Texture)value;
+ flowChart.GetVariable(key).Value = (UnityEngine.Texture)value;
break;
case "UnityEngine.Vector2":
- flowChart.GetVariable(key).value = (UnityEngine.Vector2)value;
+ flowChart.GetVariable(key).Value = (UnityEngine.Vector2)value;
break;
case "UnityEngine.Vector3":
- flowChart.GetVariable(key).value = (UnityEngine.Vector3)value;
+ flowChart.GetVariable(key).Value = (UnityEngine.Vector3)value;
break;
default:
- flowChart.GetVariable(key).value = (UnityEngine.Object)value;
+ flowChart.GetVariable(key).Value = (UnityEngine.Object)value;
break;
}
}
@@ -398,5 +399,4 @@ namespace Fungus
return types[typeName];
}
}
-
}
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Jump.cs b/Assets/Fungus/Flowchart/Scripts/Commands/Jump.cs
index 99baf005..e8fd6273 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/Jump.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/Jump.cs
@@ -1,13 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
namespace Fungus
{
+ ///
+ /// Move execution to a specific Label command in the same block.
+ ///
[CommandInfo("Flow",
"Jump",
"Move execution to a specific Label command in the same block")]
@@ -16,7 +17,7 @@ namespace Fungus
public class Jump : Command
{
[Tooltip("Name of a label in this block to jump to")]
- public StringData _targetLabel = new StringData("");
+ [SerializeField] protected StringData _targetLabel = new StringData("");
public override void OnEnter()
{
@@ -26,13 +27,13 @@ namespace Fungus
return;
}
- foreach (Command command in parentBlock.commandList)
+ foreach (Command command in ParentBlock.CommandList)
{
Label label = command as Label;
if (label != null &&
- label.key == _targetLabel.Value)
+ label.Key == _targetLabel.Value)
{
- Continue(label.commandIndex + 1);
+ Continue(label.CommandIndex + 1);
return;
}
}
@@ -65,12 +66,11 @@ namespace Fungus
{
if (targetLabelOLD != null)
{
- _targetLabel.Value = targetLabelOLD.key;
+ _targetLabel.Value = targetLabelOLD.Key;
targetLabelOLD = null;
}
}
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Label.cs b/Assets/Fungus/Flowchart/Scripts/Commands/Label.cs
index 4fb27787..af363adc 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/Label.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/Label.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Marks a position in the command list for execution to jump to.
+ ///
[CommandInfo("Flow",
"Label",
"Marks a position in the command list for execution to jump to.")]
@@ -16,7 +15,9 @@ namespace Fungus
public class Label : Command
{
[Tooltip("Display name for the label")]
- public string key = "";
+ [SerializeField] protected string key = "";
+
+ public string Key { get { return key; } }
public override void OnEnter()
{
@@ -33,5 +34,4 @@ namespace Fungus
return new Color32(200, 200, 253, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/LoadScene.cs b/Assets/Fungus/Flowchart/Scripts/Commands/LoadScene.cs
index e40a0f0a..2d5ef658 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/LoadScene.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/LoadScene.cs
@@ -1,30 +1,32 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Loads a new Unity scene and displays an optional loading image. This is useful
+ /// for splitting a large game across multiple scene files to reduce peak memory
+ /// usage. Previously loaded assets will be released before loading the scene to free up memory.
+ /// The scene to be loaded must be added to the scene list in Build Settings.")]
+ ///
[CommandInfo("Flow",
- "Load Scene",
- "Loads a new Unity scene and displays an optional loading image. This is useful " +
- "for splitting a large game across multiple scene files to reduce peak memory " +
- "usage. Previously loaded assets will be released before loading the scene to free up memory." +
- "The scene to be loaded must be added to the scene list in Build Settings.")]
+ "Load Scene",
+ "Loads a new Unity scene and displays an optional loading image. This is useful " +
+ "for splitting a large game across multiple scene files to reduce peak memory " +
+ "usage. Previously loaded assets will be released before loading the scene to free up memory." +
+ "The scene to be loaded must be added to the scene list in Build Settings.")]
[AddComponentMenu("")]
[ExecuteInEditMode]
public class LoadScene : Command
{
[Tooltip("Name of the scene to load. The scene must also be added to the build settings.")]
- public StringData _sceneName = new StringData("");
+ [SerializeField] protected StringData _sceneName = new StringData("");
[Tooltip("Image to display while loading the scene")]
- public Texture2D loadingImage;
+ [SerializeField] protected Texture2D loadingImage;
public override void OnEnter()
{
@@ -38,7 +40,7 @@ namespace Fungus
return "Error: No scene name selected";
}
- return _sceneName;
+ return _sceneName.Value;
}
public override Color GetButtonColor()
@@ -61,5 +63,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/LoadVariable.cs b/Assets/Fungus/Flowchart/Scripts/Commands/LoadVariable.cs
index 514a94a8..05367de0 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/LoadVariable.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/LoadVariable.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Loads a saved value and stores it in a Boolean, Integer, Float or String variable. If the key is not found then the variable is not modified.
+ ///
[CommandInfo("Variable",
"Load Variable",
"Loads a saved value and stores it in a Boolean, Integer, Float or String variable. If the key is not found then the variable is not modified.")]
@@ -16,7 +15,7 @@ namespace Fungus
public class LoadVariable : Command
{
[Tooltip("Name of the saved value. Supports variable substition e.g. \"player_{$PlayerNumber}\"")]
- public string key = "";
+ [SerializeField] protected string key = "";
[Tooltip("Variable to store the value in.")]
[VariableProperty(typeof(BooleanVariable),
@@ -47,7 +46,7 @@ namespace Fungus
if (booleanVariable != null)
{
// PlayerPrefs does not have bool accessors, so just use int
- booleanVariable.value = (PlayerPrefs.GetInt(prefsKey) == 1);
+ booleanVariable.Value = (PlayerPrefs.GetInt(prefsKey) == 1);
}
}
else if (variableType == typeof(IntegerVariable))
@@ -55,7 +54,7 @@ namespace Fungus
IntegerVariable integerVariable = variable as IntegerVariable;
if (integerVariable != null)
{
- integerVariable.value = PlayerPrefs.GetInt(prefsKey);
+ integerVariable.Value = PlayerPrefs.GetInt(prefsKey);
}
}
else if (variableType == typeof(FloatVariable))
@@ -63,7 +62,7 @@ namespace Fungus
FloatVariable floatVariable = variable as FloatVariable;
if (floatVariable != null)
{
- floatVariable.value = PlayerPrefs.GetFloat(prefsKey);
+ floatVariable.Value = PlayerPrefs.GetFloat(prefsKey);
}
}
else if (variableType == typeof(StringVariable))
@@ -71,7 +70,7 @@ namespace Fungus
StringVariable stringVariable = variable as StringVariable;
if (stringVariable != null)
{
- stringVariable.value = PlayerPrefs.GetString(prefsKey);
+ stringVariable.Value = PlayerPrefs.GetString(prefsKey);
}
}
@@ -90,13 +89,12 @@ namespace Fungus
return "Error: No variable selected";
}
- return "'" + key + "' into " + variable.key;
+ return "'" + key + "' into " + variable.Key;
}
public override Color GetButtonColor()
{
return new Color32(235, 191, 217, 255);
}
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/OpenURL.cs b/Assets/Fungus/Flowchart/Scripts/Commands/OpenURL.cs
index 1f925166..5054b81b 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/OpenURL.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/OpenURL.cs
@@ -1,22 +1,21 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
using Fungus;
namespace Fungus
{
-
+ ///
+ /// Opens the specified URL in the browser.
+ ///
[CommandInfo("Scripting",
"Open URL",
"Opens the specified URL in the browser.")]
public class LinkToWebsite : Command
{
[Tooltip("URL to open in the browser")]
- public StringData url = new StringData();
+ [SerializeField] protected StringData url = new StringData();
public override void OnEnter()
{
@@ -35,5 +34,4 @@ namespace Fungus
return new Color32(235, 191, 217, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Quit.cs b/Assets/Fungus/Flowchart/Scripts/Commands/Quit.cs
index 41993a16..c183172f 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/Quit.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/Quit.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Quits the application. Does not work in Editor or Webplayer builds. Shouldn't generally be used on iOS.
+ ///
[CommandInfo("Flow",
"Quit",
"Quits the application. Does not work in Editor or Webplayer builds. Shouldn't generally be used on iOS.")]
@@ -28,5 +27,4 @@ namespace Fungus
return new Color32(235, 191, 217, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/RandomFloat.cs b/Assets/Fungus/Flowchart/Scripts/Commands/RandomFloat.cs
index edfaf95b..ee5da463 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/RandomFloat.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/RandomFloat.cs
@@ -1,13 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Sets an float variable to a random value in the defined range.
+ ///
[CommandInfo("Variable",
"Random Float",
"Sets an float variable to a random value in the defined range.")]
@@ -16,19 +16,19 @@ namespace Fungus
{
[Tooltip("The variable whos value will be set")]
[VariableProperty(typeof(FloatVariable))]
- public FloatVariable variable;
+ [SerializeField] protected FloatVariable variable;
[Tooltip("Minimum value for random range")]
- public FloatData minValue;
+ [SerializeField] protected FloatData minValue;
[Tooltip("Maximum value for random range")]
- public FloatData maxValue;
+ [SerializeField] protected FloatData maxValue;
public override void OnEnter()
{
if (variable != null)
{
- variable.value = Random.Range(minValue.Value, maxValue.Value);
+ variable.Value = Random.Range(minValue.Value, maxValue.Value);
}
Continue();
@@ -41,7 +41,7 @@ namespace Fungus
return "Error: Variable not selected";
}
- return variable.key;
+ return variable.Key;
}
public override bool HasReference(Variable variable)
@@ -54,5 +54,4 @@ namespace Fungus
return new Color32(253, 253, 150, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/RandomInteger.cs b/Assets/Fungus/Flowchart/Scripts/Commands/RandomInteger.cs
index 8eb5e3bb..e2ceddbc 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/RandomInteger.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/RandomInteger.cs
@@ -1,13 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Sets an integer variable to a random value in the defined range.
+ ///
[CommandInfo("Variable",
"Random Integer",
"Sets an integer variable to a random value in the defined range.")]
@@ -16,19 +16,19 @@ namespace Fungus
{
[Tooltip("The variable whos value will be set")]
[VariableProperty(typeof(IntegerVariable))]
- public IntegerVariable variable;
+ [SerializeField] protected IntegerVariable variable;
[Tooltip("Minimum value for random range")]
- public IntegerData minValue;
+ [SerializeField] protected IntegerData minValue;
[Tooltip("Maximum value for random range")]
- public IntegerData maxValue;
+ [SerializeField] protected IntegerData maxValue;
public override void OnEnter()
{
if (variable != null)
{
- variable.value = Random.Range(minValue.Value, maxValue.Value);
+ variable.Value = Random.Range(minValue.Value, maxValue.Value);
}
Continue();
@@ -41,7 +41,7 @@ namespace Fungus
return "Error: Variable not selected";
}
- return variable.key;
+ return variable.Key;
}
public override bool HasReference(Variable variable)
@@ -54,5 +54,4 @@ namespace Fungus
return new Color32(253, 253, 150, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/ReadTextFile.cs b/Assets/Fungus/Flowchart/Scripts/Commands/ReadTextFile.cs
index 144dc9e6..79d8815d 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/ReadTextFile.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/ReadTextFile.cs
@@ -1,26 +1,25 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
using Fungus;
namespace Fungus
{
-
+ ///
+ /// Reads in a text file and stores the contents in a string variable.
+ ///
[CommandInfo("Variable",
"Read Text File",
"Reads in a text file and stores the contents in a string variable")]
public class ReadTextFile : Command
{
[Tooltip("Text file to read into the string variable")]
- public TextAsset textFile;
+ [SerializeField] protected TextAsset textFile;
[Tooltip("String variable to store the tex file contents in")]
[VariableProperty(typeof(StringVariable))]
- public StringVariable stringVariable;
+ [SerializeField] protected StringVariable stringVariable;
public override void OnEnter()
{
@@ -31,7 +30,7 @@ namespace Fungus
return;
}
- stringVariable.value = textFile.text;
+ stringVariable.Value = textFile.text;
Continue();
}
@@ -48,7 +47,7 @@ namespace Fungus
return "Error: Text file not selected";
}
- return stringVariable.key;
+ return stringVariable.Key;
}
public override bool HasReference(Variable variable)
@@ -61,5 +60,4 @@ namespace Fungus
return new Color32(253, 253, 150, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Reset.cs b/Assets/Fungus/Flowchart/Scripts/Commands/Reset.cs
index cebec1fc..fd7ed387 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/Reset.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/Reset.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Resets the state of all commands and variables in the Flowchart.
+ ///
[CommandInfo("Variable",
"Reset",
"Resets the state of all commands and variables in the Flowchart.")]
@@ -16,10 +15,10 @@ namespace Fungus
public class Reset : Command
{
[Tooltip("Reset state of all commands in the script")]
- public bool resetCommands = true;
+ [SerializeField] protected bool resetCommands = true;
[Tooltip("Reset variables back to their default values")]
- public bool resetVariables = true;
+ [SerializeField] protected bool resetVariables = true;
public override void OnEnter()
{
@@ -32,5 +31,4 @@ namespace Fungus
return new Color32(235, 191, 217, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SaveVariable.cs b/Assets/Fungus/Flowchart/Scripts/Commands/SaveVariable.cs
index 38d5e9ed..9aeb505f 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/SaveVariable.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/SaveVariable.cs
@@ -1,14 +1,15 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Save an Boolean, Integer, Float or String variable to persistent storage using a string key.
+ /// The value can be loaded again later using the Load Variable command. You can also
+ /// use the Set Save Profile command to manage separate save profiles for multiple players.
+ ///
[CommandInfo("Variable",
"Save Variable",
"Save an Boolean, Integer, Float or String variable to persistent storage using a string key. " +
@@ -18,7 +19,7 @@ namespace Fungus
public class SaveVariable : Command
{
[Tooltip("Name of the saved value. Supports variable substition e.g. \"player_{$PlayerNumber}")]
- public string key = "";
+ [SerializeField] protected string key = "";
[Tooltip("Variable to read the value from. Only Boolean, Integer, Float and String are supported.")]
[VariableProperty(typeof(BooleanVariable),
@@ -49,7 +50,7 @@ namespace Fungus
if (booleanVariable != null)
{
// PlayerPrefs does not have bool accessors, so just use int
- PlayerPrefs.SetInt(prefsKey, booleanVariable.value ? 1 : 0);
+ PlayerPrefs.SetInt(prefsKey, booleanVariable.Value ? 1 : 0);
}
}
else if (variableType == typeof(IntegerVariable))
@@ -57,7 +58,7 @@ namespace Fungus
IntegerVariable integerVariable = variable as IntegerVariable;
if (integerVariable != null)
{
- PlayerPrefs.SetInt(prefsKey, integerVariable.value);
+ PlayerPrefs.SetInt(prefsKey, integerVariable.Value);
}
}
else if (variableType == typeof(FloatVariable))
@@ -65,7 +66,7 @@ namespace Fungus
FloatVariable floatVariable = variable as FloatVariable;
if (floatVariable != null)
{
- PlayerPrefs.SetFloat(prefsKey, floatVariable.value);
+ PlayerPrefs.SetFloat(prefsKey, floatVariable.Value);
}
}
else if (variableType == typeof(StringVariable))
@@ -73,7 +74,7 @@ namespace Fungus
StringVariable stringVariable = variable as StringVariable;
if (stringVariable != null)
{
- PlayerPrefs.SetString(prefsKey, stringVariable.value);
+ PlayerPrefs.SetString(prefsKey, stringVariable.Value);
}
}
@@ -92,13 +93,12 @@ namespace Fungus
return "Error: No variable selected";
}
- return variable.key + " into '" + key + "'";
+ return variable.Key + " into '" + key + "'";
}
public override Color GetButtonColor()
{
return new Color32(235, 191, 217, 255);
}
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SendMessage.cs b/Assets/Fungus/Flowchart/Scripts/Commands/SendMessage.cs
index c0e371fc..7e26c73e 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/SendMessage.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/SendMessage.cs
@@ -1,14 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Sends a message to either the owner Flowchart or all Flowcharts in the scene. Blocks can listen for this message using a Message Received event handler.
+ ///
[CommandInfo("Flow",
"Send Message",
"Sends a message to either the owner Flowchart or all Flowcharts in the scene. Blocks can listen for this message using a Message Received event handler.")]
@@ -23,10 +23,10 @@ namespace Fungus
}
[Tooltip("Target flowchart(s) to send the message to")]
- public MessageTarget messageTarget;
+ [SerializeField] protected MessageTarget messageTarget;
[Tooltip("Name of the message to send")]
- public StringData _message = new StringData("");
+ [SerializeField] protected StringData _message = new StringData("");
public override void OnEnter()
{
@@ -89,5 +89,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SetActive.cs b/Assets/Fungus/Flowchart/Scripts/Commands/SetActive.cs
index 8cfdb195..23e509e5 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/SetActive.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/SetActive.cs
@@ -1,15 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Sets a game object in the scene to be active / inactive.
+ ///
[CommandInfo("Scripting",
"Set Active",
"Sets a game object in the scene to be active / inactive.")]
@@ -18,10 +17,10 @@ namespace Fungus
public class SetActive : Command
{
[Tooltip("Reference to game object to enable / disable")]
- public GameObjectData _targetGameObject;
+ [SerializeField] protected GameObjectData _targetGameObject;
[Tooltip("Set to true to enable the game object")]
- public BooleanData activeState;
+ [SerializeField] protected BooleanData activeState;
public override void OnEnter()
{
@@ -63,5 +62,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SetSaveProfile.cs b/Assets/Fungus/Flowchart/Scripts/Commands/SetSaveProfile.cs
index 245f9f79..374a0a31 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/SetSaveProfile.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/SetSaveProfile.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System;
@@ -9,19 +7,22 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Sets the active profile that the Save Variable and Load Variable commands will use. This is useful to crete multiple player save games. Once set, the profile applies across all Flowcharts and will also persist across scene loads.
+ ///
[CommandInfo("Variable",
"Set Save Profile",
"Sets the active profile that the Save Variable and Load Variable commands will use. This is useful to crete multiple player save games. Once set, the profile applies across all Flowcharts and will also persist across scene loads.")]
[AddComponentMenu("")]
public class SetSaveProfile : Command
{
- /**
- * Shared save profile name used by SaveVariable and LoadVariable.
- */
+ ///
+ /// Shared save profile name used by SaveVariable and LoadVariable.
+ ///
public static string saveProfile = "";
[Tooltip("Name of save profile to make active.")]
- public string saveProfileName = "";
+ [SerializeField] protected string saveProfileName = "";
public override void OnEnter()
{
@@ -39,6 +40,5 @@ namespace Fungus
{
return new Color32(235, 191, 217, 255);
}
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SetVariable.cs b/Assets/Fungus/Flowchart/Scripts/Commands/SetVariable.cs
index fb41c59d..09b8314c 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/SetVariable.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/SetVariable.cs
@@ -1,13 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Sets a Boolean, Integer, Float or String variable to a new value using a simple arithmetic operation. The value can be a constant or reference another variable of the same type.
+ ///
[CommandInfo("Variable",
"Set Variable",
"Sets a Boolean, Integer, Float or String variable to a new value using a simple arithmetic operation. The value can be a constant or reference another variable of the same type.")]
@@ -29,22 +29,23 @@ namespace Fungus
typeof(IntegerVariable),
typeof(FloatVariable),
typeof(StringVariable))]
- public Variable variable;
+ [SerializeField] protected Variable variable;
[Tooltip("The type of math operation to be performed")]
- public SetOperator setOperator;
+ [SerializeField] protected SetOperator setOperator;
+ public SetOperator _SetOperator { get { return setOperator; } }
[Tooltip("Boolean value to set with")]
- public BooleanData booleanData;
+ [SerializeField] protected BooleanData booleanData;
[Tooltip("Integer value to set with")]
- public IntegerData integerData;
+ [SerializeField] protected IntegerData integerData;
[Tooltip("Float value to set with")]
- public FloatData floatData;
+ [SerializeField] protected FloatData floatData;
[Tooltip("String value to set with")]
- public StringDataMulti stringData;
+ [SerializeField] protected StringDataMulti stringData;
public override void OnEnter()
{
@@ -60,7 +61,7 @@ namespace Fungus
return "Error: Variable not selected";
}
- string description = variable.key;
+ string description = variable.Key;
switch (setOperator)
{
@@ -131,10 +132,10 @@ namespace Fungus
{
default:
case SetOperator.Assign:
- lhs.value = rhs;
+ lhs.Value = rhs;
break;
case SetOperator.Negate:
- lhs.value = !rhs;
+ lhs.Value = !rhs;
break;
}
}
@@ -147,19 +148,19 @@ namespace Fungus
{
default:
case SetOperator.Assign:
- lhs.value = rhs;
+ lhs.Value = rhs;
break;
case SetOperator.Add:
- lhs.value += rhs;
+ lhs.Value += rhs;
break;
case SetOperator.Subtract:
- lhs.value -= rhs;
+ lhs.Value -= rhs;
break;
case SetOperator.Multiply:
- lhs.value *= rhs;
+ lhs.Value *= rhs;
break;
case SetOperator.Divide:
- lhs.value /= rhs;
+ lhs.Value /= rhs;
break;
}
}
@@ -172,19 +173,19 @@ namespace Fungus
{
default:
case SetOperator.Assign:
- lhs.value = rhs;
+ lhs.Value = rhs;
break;
case SetOperator.Add:
- lhs.value += rhs;
+ lhs.Value += rhs;
break;
case SetOperator.Subtract:
- lhs.value -= rhs;
+ lhs.Value -= rhs;
break;
case SetOperator.Multiply:
- lhs.value *= rhs;
+ lhs.Value *= rhs;
break;
case SetOperator.Divide:
- lhs.value /= rhs;
+ lhs.Value /= rhs;
break;
}
}
@@ -197,11 +198,10 @@ namespace Fungus
{
default:
case SetOperator.Assign:
- lhs.value = rhs;
+ lhs.Value = rhs;
break;
}
}
}
}
-
}
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SpawnObject.cs b/Assets/Fungus/Flowchart/Scripts/Commands/SpawnObject.cs
index 65fc88d7..fc487cb1 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/SpawnObject.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/SpawnObject.cs
@@ -1,17 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System.Collections;
namespace Fungus
{
- // This command is called "Call Method" because a) it's more descriptive than Send Message and we're already have
- // a Send Message command for sending messages to trigger block execution.
-
+ ///
+ /// Spawns a new object based on a reference to a scene or prefab game object.
+ ///
[CommandInfo("Scripting",
"Spawn Object",
"Spawns a new object based on a reference to a scene or prefab game object.")]
@@ -20,16 +17,16 @@ namespace Fungus
public class SpawnObject : Command
{
[Tooltip("Game object to copy when spawning. Can be a scene object or a prefab.")]
- public GameObjectData _sourceObject;
+ [SerializeField] protected GameObjectData _sourceObject;
[Tooltip("Transform to use for position of newly spawned object.")]
- public TransformData _parentTransform;
+ [SerializeField] protected TransformData _parentTransform;
[Tooltip("Local position of newly spawned object.")]
- public Vector3Data _spawnPosition;
+ [SerializeField] protected Vector3Data _spawnPosition;
[Tooltip("Local rotation of newly spawned object.")]
- public Vector3Data _spawnRotation;
+ [SerializeField] protected Vector3Data _spawnRotation;
public override void OnEnter()
{
@@ -99,5 +96,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Stop.cs b/Assets/Fungus/Flowchart/Scripts/Commands/Stop.cs
index cde5d8d2..4a2669ac 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/Stop.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/Stop.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Stop executing the Block that contains this command.
+ ///
[CommandInfo("Flow",
"Stop",
"Stop executing the Block that contains this command.")]
@@ -25,5 +24,4 @@ namespace Fungus
return new Color32(235, 191, 217, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/StopBlock.cs b/Assets/Fungus/Flowchart/Scripts/Commands/StopBlock.cs
index 1084e6c1..f7a3f89e 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/StopBlock.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/StopBlock.cs
@@ -1,24 +1,23 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
-
+ ///
+ /// Stops executing the named Block.
+ ///
[CommandInfo("Flow",
"Stop Block",
"Stops executing the named Block")]
public class StopBlock : Command
{
[Tooltip("Flowchart containing the Block. If none is specified, the parent Flowchart is used.")]
- public Flowchart flowchart;
+ [SerializeField] protected Flowchart flowchart;
[Tooltip("Name of the Block to stop")]
- public StringData blockName = new StringData("");
+ [SerializeField] protected StringData blockName = new StringData("");
public override void OnEnter()
{
@@ -54,5 +53,4 @@ namespace Fungus
return new Color32(253, 253, 150, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/StopFlowchart.cs b/Assets/Fungus/Flowchart/Scripts/Commands/StopFlowchart.cs
index f98c5cba..938d89ba 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/StopFlowchart.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/StopFlowchart.cs
@@ -1,14 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Stops execution of all Blocks in a Flowchart.
+ ///
[CommandInfo("Flow",
"Stop Flowchart",
"Stops execution of all Blocks in a Flowchart")]
@@ -16,10 +16,10 @@ namespace Fungus
public class StopFlowchart : Command
{
[Tooltip("Stop all executing Blocks in the Flowchart that contains this command")]
- public bool stopParentFlowchart;
+ [SerializeField] protected bool stopParentFlowchart;
[Tooltip("Stop all executing Blocks in a list of target Flowcharts")]
- public List targetFlowcharts = new List();
+ [SerializeField] protected List targetFlowcharts = new List();
public override void OnEnter()
{
@@ -57,5 +57,4 @@ namespace Fungus
return new Color32(235, 191, 217, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/Wait.cs b/Assets/Fungus/Flowchart/Scripts/Commands/Wait.cs
index 141675e4..4925749f 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/Wait.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/Wait.cs
@@ -1,15 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Waits for period of time before executing the next command in the block.
+ ///
[CommandInfo("Flow",
"Wait",
"Waits for period of time before executing the next command in the block.")]
@@ -18,7 +17,7 @@ namespace Fungus
public class Wait : Command
{
[Tooltip("Duration to wait for")]
- public FloatData _duration = new FloatData(1);
+ [SerializeField] protected FloatData _duration = new FloatData(1);
public override void OnEnter()
{
@@ -55,5 +54,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/While.cs b/Assets/Fungus/Flowchart/Scripts/Commands/While.cs
index fc025f75..3720933b 100644
--- a/Assets/Fungus/Flowchart/Scripts/Commands/While.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Commands/While.cs
@@ -1,15 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Continuously loop through a block of commands while the condition is true. Use the Break command to force the loop to terminate immediately.
+ ///
[CommandInfo("Flow",
"While",
"Continuously loop through a block of commands while the condition is true. Use the Break command to force the loop to terminate immediately.")]
@@ -26,12 +24,12 @@ namespace Fungus
// Find next End statement at same indent level
End endCommand = null;
- for (int i = commandIndex + 1; i < parentBlock.commandList.Count; ++i)
+ for (int i = CommandIndex + 1; i < ParentBlock.CommandList.Count; ++i)
{
- End command = parentBlock.commandList[i] as End;
+ End command = ParentBlock.CommandList[i] as End;
if (command != null &&
- command.indentLevel == indentLevel)
+ command.IndentLevel == indentLevel)
{
endCommand = command;
break;
@@ -41,13 +39,13 @@ namespace Fungus
if (execute)
{
// Tell the following end command to loop back
- endCommand.loop = true;
+ endCommand.Loop = true;
Continue();
}
else
{
// Continue at next command after End
- Continue (endCommand.commandIndex + 1);
+ Continue (endCommand.CommandIndex + 1);
}
}
@@ -60,6 +58,5 @@ namespace Fungus
{
return new Color32(253, 253, 150, 255);
}
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandler.cs b/Assets/Fungus/Flowchart/Scripts/EventHandler.cs
index 0ae07130..f15c59a1 100644
--- a/Assets/Fungus/Flowchart/Scripts/EventHandler.cs
+++ b/Assets/Fungus/Flowchart/Scripts/EventHandler.cs
@@ -1,17 +1,15 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
using System;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
-
+ ///
+ /// Attribute class for Fungus event handlers.
+ ///
public class EventHandlerInfoAttribute : Attribute
{
public EventHandlerInfoAttribute(string category, string eventHandlerName, string helpText)
@@ -26,26 +24,31 @@ namespace Fungus
public string HelpText { get; set; }
}
- /**
- * A Block may have an associated Event Handler which starts executing commands when
- * a specific event occurs.
- * To create a custom Event Handler, simply subclass EventHandler and call the ExecuteBlock() method
- * when the event occurs.
- * Add an EventHandlerInfo attibute and your new EventHandler class will automatically appear in the
- * 'Execute On Event' dropdown menu when a block is selected.
- */
+ ///
+ /// A Block may have an associated Event Handler which starts executing commands when
+ /// a specific event occurs.
+ /// To create a custom Event Handler, simply subclass EventHandler and call the ExecuteBlock() method
+ /// when the event occurs.
+ /// Add an EventHandlerInfo attibute and your new EventHandler class will automatically appear in the
+ /// 'Execute On Event' dropdown menu when a block is selected.
+ ///
[RequireComponent(typeof(Block))]
[RequireComponent(typeof(Flowchart))]
[AddComponentMenu("")]
public class EventHandler : MonoBehaviour
{
+ ///
+ /// Returns the parent Block which owns this Event Handler.
+ ///
+ /// The parent block.
[HideInInspector]
[FormerlySerializedAs("parentSequence")]
- public Block parentBlock;
+ [SerializeField] protected Block parentBlock;
+ public Block ParentBlock { get { return parentBlock; } set { parentBlock = value; } }
- /**
- * The Event Handler should call this method when the event is detected.
- */
+ ///
+ /// The Event Handler should call this method when the event is detected.
+ ///
public virtual bool ExecuteBlock()
{
if (parentBlock == null)
@@ -53,7 +56,7 @@ namespace Fungus
return false;
}
- if (parentBlock.eventHandler != this)
+ if (parentBlock._EventHandler != this)
{
return false;
}
@@ -61,17 +64,17 @@ namespace Fungus
Flowchart flowchart = parentBlock.GetFlowchart();
// Auto-follow the executing block if none is currently selected
- if (flowchart.selectedBlock == null)
+ if (flowchart.SelectedBlock == null)
{
- flowchart.selectedBlock = parentBlock;
+ flowchart.SelectedBlock = parentBlock;
}
return flowchart.ExecuteBlock(parentBlock);
}
- /**
- * Returns a custom summary for the event handler.
- */
+ ///
+ /// Returns custom summary text for the event handler.
+ ///
public virtual string GetSummary()
{
return "";
diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandlers/FlowchartEnabled.cs b/Assets/Fungus/Flowchart/Scripts/EventHandlers/FlowchartEnabled.cs
index 5467a1cf..50c78d43 100644
--- a/Assets/Fungus/Flowchart/Scripts/EventHandlers/FlowchartEnabled.cs
+++ b/Assets/Fungus/Flowchart/Scripts/EventHandlers/FlowchartEnabled.cs
@@ -1,15 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// The block will execute when the Flowchart game object is enabled.
+ ///
[EventHandlerInfo("",
"Flowchart Enabled",
"The block will execute when the Flowchart game object is enabled.")]
diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandlers/GameStarted.cs b/Assets/Fungus/Flowchart/Scripts/EventHandlers/GameStarted.cs
index cc614398..39891c41 100644
--- a/Assets/Fungus/Flowchart/Scripts/EventHandlers/GameStarted.cs
+++ b/Assets/Fungus/Flowchart/Scripts/EventHandlers/GameStarted.cs
@@ -1,15 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// The block will execute when the game starts playing.
+ ///
[EventHandlerInfo("",
"Game Started",
"The block will execute when the game starts playing.")]
diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandlers/KeyPressed.cs b/Assets/Fungus/Flowchart/Scripts/EventHandlers/KeyPressed.cs
index ecf973fa..69c6c1f4 100644
--- a/Assets/Fungus/Flowchart/Scripts/EventHandlers/KeyPressed.cs
+++ b/Assets/Fungus/Flowchart/Scripts/EventHandlers/KeyPressed.cs
@@ -1,13 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// The block will execute when a key press event occurs.
+ ///
[EventHandlerInfo("Input",
"Key Pressed",
"The block will execute when a key press event occurs.")]
@@ -22,10 +22,10 @@ namespace Fungus
}
[Tooltip("The type of keypress to activate on")]
- public KeyPressType keyPressType;
+ [SerializeField] protected KeyPressType keyPressType;
[Tooltip("Keycode of the key to activate on")]
- public KeyCode keyCode;
+ [SerializeField] protected KeyCode keyCode;
protected virtual void Update()
{
diff --git a/Assets/Fungus/Flowchart/Scripts/EventHandlers/MessageReceived.cs b/Assets/Fungus/Flowchart/Scripts/EventHandlers/MessageReceived.cs
index c21c01e4..3da23d25 100644
--- a/Assets/Fungus/Flowchart/Scripts/EventHandlers/MessageReceived.cs
+++ b/Assets/Fungus/Flowchart/Scripts/EventHandlers/MessageReceived.cs
@@ -1,13 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// The block will execute when the specified message is received from a Send Message command.
+ ///
[EventHandlerInfo("",
"Message Received",
"The block will execute when the specified message is received from a Send Message command.")]
@@ -15,7 +15,7 @@ namespace Fungus
public class MessageReceived : EventHandler
{
[Tooltip("Fungus message to listen for")]
- public string message = "";
+ [SerializeField] protected string message = "";
public void OnSendFungusMessage(string message)
{
@@ -30,5 +30,4 @@ namespace Fungus
return message;
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs
index b9b13320..c8a28ea4 100644
--- a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.EventSystems;
@@ -14,185 +12,207 @@ using System.Text.RegularExpressions;
namespace Fungus
{
- /**
- * Interface for Flowchart components which can be updated when the
- * scene loads in the editor. This is used to maintain backwards
- * compatibility with earlier versions of Fungus.
- */
+ ///
+ /// Interface for Flowchart components which can be updated when the
+ /// scene loads in the editor. This is used to maintain backwards
+ /// compatibility with earlier versions of Fungus.
+ ///
interface IUpdateable
{
void UpdateToVersion(int oldVersion, int newVersion);
}
- /**
- * Visual scripting controller for the Flowchart programming language.
- * Flowchart objects may be edited visually using the Flowchart editor window.
- */
+ ///
+ /// Visual scripting controller for the Flowchart programming language.
+ /// Flowchart objects may be edited visually using the Flowchart editor window.
+ ///
[ExecuteInEditMode]
public class Flowchart : MonoBehaviour, StringSubstituter.ISubstitutionHandler
{
- /**
- * The current version of the Flowchart. Used for updating components.
- */
+ ///
+ /// The current version of the Flowchart. Used for updating components.
+ ///
public const int CURRENT_VERSION = 1;
- /**
- * The name of the initial block in a new flowchart.
- */
+ ///
+ /// The name of the initial block in a new flowchart.
+ ///
public const string DEFAULT_BLOCK_NAME = "New Block";
- /**
- * Variable to track flowchart's version so components can update to new versions.
- */
+ ///
+ /// Variable to track flowchart's version so components can update to new versions.
+ ///
[HideInInspector]
- public int version = 0; // Default to 0 to always trigger an update for older versions of Fungus.
+ [SerializeField] protected int version = 0; // Default to 0 to always trigger an update for older versions of Fungus.
+ public int Version { set { version = value; } }
- /**
- * Scroll position of Flowchart editor window.
- */
+ ///
+ /// Scroll position of Flowchart editor window.
+ ///
[HideInInspector]
- public Vector2 scrollPos;
+ [SerializeField] protected Vector2 scrollPos;
+ public Vector2 ScrollPos { get { return scrollPos; } set { scrollPos = value; } }
- /**
- * Scroll position of Flowchart variables window.
- */
+ ///
+ /// Scroll position of Flowchart variables window.
+ ///
[HideInInspector]
- public Vector2 variablesScrollPos;
+ [SerializeField] protected Vector2 variablesScrollPos;
+ public Vector2 VariablesScrollPos { get { return variablesScrollPos; } set { variablesScrollPos = value; } }
- /**
- * Show the variables pane.
- */
+ ///
+ /// Show the variables pane.
+ ///
[HideInInspector]
- public bool variablesExpanded = true;
+ [SerializeField] protected bool variablesExpanded = true;
+ public bool VariablesExpanded { get { return variablesExpanded; } set { variablesExpanded = value; } }
- /**
- * Height of command block view in inspector.
- */
+ ///
+ /// Height of command block view in inspector.
+ ///
[HideInInspector]
- public float blockViewHeight = 400;
+ [SerializeField] protected float blockViewHeight = 400;
+ public float BlockViewHeight { get { return blockViewHeight; } set { blockViewHeight = value; } }
- /**
- * Zoom level of Flowchart editor window
- */
+ ///
+ /// Zoom level of Flowchart editor window.
+ ///
[HideInInspector]
- public float zoom = 1f;
+ [SerializeField] protected float zoom = 1f;
+ public float Zoom { get { return zoom; } set { zoom = value; } }
- /**
- * Scrollable area for Flowchart editor window.
- */
+ ///
+ /// Scrollable area for Flowchart editor window.
+ ///
[HideInInspector]
- public Rect scrollViewRect;
+ [SerializeField] protected Rect scrollViewRect;
+ public Rect ScrollViewRect { get { return scrollViewRect; } set { scrollViewRect = value; } }
- /**
- * Currently selected block in the Flowchart editor.
- */
+ ///
+ /// Currently selected block in the Flowchart editor.
+ ///
[HideInInspector]
[FormerlySerializedAs("selectedSequence")]
- public Block selectedBlock;
-
- /**
- * Currently selected command in the Flowchart editor.
- */
+ [SerializeField] protected Block selectedBlock;
+ public Block SelectedBlock { get { return selectedBlock; } set { selectedBlock = value; } }
+
+ ///
+ /// Currently selected command in the Flowchart editor.
+ ///
[HideInInspector]
- public List selectedCommands = new List();
+ [SerializeField] protected List selectedCommands = new List();
+ public List SelectedCommands { get { return selectedCommands; } }
- /**
- * The list of variables that can be accessed by the Flowchart.
- */
+ ///
+ /// The list of variables that can be accessed by the Flowchart.
+ ///
[HideInInspector]
- public List variables = new List();
+ [SerializeField] protected List variables = new List();
+ public List Variables { get { return variables; } }
+ ///
+ /// Description text displayed in the Flowchart editor window
+ ///
[TextArea(3, 5)]
[Tooltip("Description text displayed in the Flowchart editor window")]
- public string description = "";
+ [SerializeField] protected string description = "";
+ public string Description { get { return description; } }
- /**
- * Slow down execution in the editor to make it easier to visualise program flow.
- */
+ ///
+ /// Slow down execution in the editor to make it easier to visualise program flow.
+ ///
[Range(0f, 5f)]
[Tooltip("Adds a pause after each execution step to make it easier to visualise program flow. Editor only, has no effect in platform builds.")]
- public float stepPause = 0f;
+ [SerializeField] protected float stepPause = 0f;
+ public float StepPause { get { return stepPause; } }
- /**
- * Use command color when displaying the command list in the inspector.
- */
+ ///
+ /// Use command color when displaying the command list in the inspector.
+ ///
[Tooltip("Use command color when displaying the command list in the Fungus Editor window")]
- public bool colorCommands = true;
+ [SerializeField] protected bool colorCommands = true;
+ public bool ColorCommands { get { return colorCommands; } }
- /**
- * Hides the Flowchart block and command components in the inspector.
- * Deselect to inspect the block and command components that make up the Flowchart.
- */
- [Tooltip("Hides the Flowchart block and command components in the inspector")]
- public bool hideComponents = true;
-
- /**
- * Saves the selected block and commands when saving the scene.
- * Helps avoid version control conflicts if you've only changed the active selection.
- */
- [Tooltip("Saves the selected block and commands when saving the scene.")]
- public bool saveSelection = true;
-
- /**
- * Unique identifier for identifying this flowchart in localized string keys.
- */
+ ///
+ /// Hides the Flowchart block and command components in the inspector.
+ /// Deselect to inspect the block and command components that make up the Flowchart.
+ ///
+ [Tooltip("Hides the Flowchart block and command components in the inspector. Deselect to inspect the block and command components that make up the Flowchart.")]
+ [SerializeField] protected bool hideComponents = true;
+
+ ///
+ /// Saves the selected block and commands when saving the scene. Helps avoid version control conflicts if you've only changed the active selection.
+ ///
+ [Tooltip("Saves the selected block and commands when saving the scene. Helps avoid version control conflicts if you've only changed the active selection.")]
+ [SerializeField] protected bool saveSelection = true;
+ public bool SaveSelection { get { return saveSelection; } }
+
+ ///
+ /// Unique identifier for identifying this flowchart in localized string keys.
+ ///
[Tooltip("Unique identifier for this flowchart in localized string keys. If no id is specified then the name of the Flowchart object will be used.")]
- public string localizationId = "";
+ [SerializeField] protected string localizationId = "";
+ public string LocalizationId { get { return localizationId; } }
- /**
- * Display line numbers in the command list in the Block inspector.
- */
+ ///
+ /// Display line numbers in the command list in the Block inspector.
+ ///
[Tooltip("Display line numbers in the command list in the Block inspector.")]
- public bool showLineNumbers = false;
+ [SerializeField] protected bool showLineNumbers = false;
+ public bool ShowLineNumbers { get { return showLineNumbers; } }
- /**
- * List of commands to hide in the Add Command menu. Use this to restrict the set of commands available when editing a Flowchart.
- */
+ ///
+ /// List of commands to hide in the Add Command menu. Use this to restrict the set of commands available when editing a Flowchart.
+ ///
[Tooltip("List of commands to hide in the Add Command menu. Use this to restrict the set of commands available when editing a Flowchart.")]
- public List hideCommands = new List();
+ [SerializeField] protected List hideCommands = new List();
+ ///
+ /// Lua Environment to be used by default for all Execute Lua commands in this Flowchart.
+ ///
[Tooltip("Lua Environment to be used by default for all Execute Lua commands in this Flowchart")]
- public LuaEnvironment luaEnvironment;
+ [SerializeField] protected LuaEnvironment luaEnvironment;
+ public LuaEnvironment _LuaEnvironment { get { return luaEnvironment; } }
- /**
- * The ExecuteLua command adds a global Lua variable with this name bound to the flowchart prior to executing.
- */
+ ///
+ /// The ExecuteLua command adds a global Lua variable with this name bound to the flowchart prior to executing.
+ ///
[Tooltip("The ExecuteLua command adds a global Lua variable with this name bound to the flowchart prior to executing.")]
- public string luaBindingName = "flowchart";
+ [SerializeField] protected string luaBindingName = "flowchart";
+ public string LuaBindingName { get { return luaBindingName; } }
- /**
- * Position in the center of all blocks in the flowchart.
- */
- [NonSerialized]
- public Vector2 centerPosition = Vector2.zero;
+ ///
+ /// Position in the center of all blocks in the flowchart.
+ ///
+ public Vector2 CenterPosition { set; get; }
- /**
- * Cached list of flowchart objects in the scene for fast lookup
- */
+ ///
+ /// Cached list of flowchart objects in the scene for fast lookup.
+ ///
public static List cachedFlowcharts = new List();
protected static bool eventSystemPresent;
protected StringSubstituter stringSubstituer;
- /**
- * Returns the next id to assign to a new flowchart item.
- * Item ids increase monotically so they are guaranteed to
- * be unique within a Flowchart.
- */
+ ///
+ /// Returns the next id to assign to a new flowchart item.
+ /// Item ids increase monotically so they are guaranteed to
+ /// be unique within a Flowchart.
+ ///
public int NextItemId()
{
int maxId = -1;
Block[] blocks = GetComponents();
foreach (Block block in blocks)
{
- maxId = Math.Max(maxId, block.itemId);
+ maxId = Math.Max(maxId, block.ItemId);
}
Command[] commands = GetComponents();
foreach (Command command in commands)
{
- maxId = Math.Max(maxId, command.itemId);
+ maxId = Math.Max(maxId, command.ItemId);
}
return maxId + 1;
}
@@ -292,23 +312,23 @@ namespace Fungus
Block[] blocks = GetComponents();
foreach (Block block in blocks)
{
- if (block.itemId == -1 ||
- usedIds.Contains(block.itemId))
+ if (block.ItemId == -1 ||
+ usedIds.Contains(block.ItemId))
{
- block.itemId = NextItemId();
+ block.ItemId = NextItemId();
}
- usedIds.Add(block.itemId);
+ usedIds.Add(block.ItemId);
}
Command[] commands = GetComponents();
foreach (Command command in commands)
{
- if (command.itemId == -1 ||
- usedIds.Contains(command.itemId))
+ if (command.ItemId == -1 ||
+ usedIds.Contains(command.ItemId))
{
- command.itemId = NextItemId();
+ command.ItemId = NextItemId();
}
- usedIds.Add(command.itemId);
+ usedIds.Add(command.ItemId);
}
}
@@ -337,7 +357,7 @@ namespace Fungus
bool found = false;
foreach (Block block in blocks)
{
- if (block.commandList.Contains(command))
+ if (block.CommandList.Contains(command))
{
found = true;
break;
@@ -355,7 +375,7 @@ namespace Fungus
bool found = false;
foreach (Block block in blocks)
{
- if (block.eventHandler == eventHandler)
+ if (block._EventHandler == eventHandler)
{
found = true;
break;
@@ -375,29 +395,28 @@ namespace Fungus
return block;
}
- /**
- * Create a new block node which you can then add commands to.
- */
+ ///
+ /// Create a new block node which you can then add commands to.
+ ///
public virtual Block CreateBlock(Vector2 position)
{
Block b = CreateBlockComponent(gameObject);
- b.nodeRect.x = position.x;
- b.nodeRect.y = position.y;
- b.blockName = GetUniqueBlockKey(b.blockName, b);
- b.itemId = NextItemId();
+ b._NodeRect = new Rect(position.x, position.y, 0, 0);
+ b.BlockName = GetUniqueBlockKey(b.BlockName, b);
+ b.ItemId = NextItemId();
return b;
}
- /**
- * Returns the named Block in the flowchart, or null if not found.
- */
+ ///
+ /// Returns the named Block in the flowchart, or null if not found.
+ ///
public virtual Block FindBlock(string blockName)
{
Block [] blocks = GetComponents();
foreach (Block block in blocks)
{
- if (block.blockName == blockName)
+ if (block.BlockName == blockName)
{
return block;
}
@@ -406,17 +425,15 @@ namespace Fungus
return null;
}
- /**
- * Execute a child block in the Flowchart.
- * You can use this method in a UI event. e.g. to handle a button click.
- * Returns true if the Block started execution.
- */
+ ///
+ /// Execute a child block in the Flowchart.
+ /// You can use this method in a UI event. e.g. to handle a button click.
public virtual void ExecuteBlock(string blockName)
{
Block block = null;
foreach (Block b in GetComponents())
{
- if (b.blockName == blockName)
+ if (b.BlockName == blockName)
{
block = b;
break;
@@ -435,12 +452,12 @@ namespace Fungus
}
}
- /**
- * Execute a child block in the flowchart.
- * The block must be in an idle state to be executed.
- * This version provides extra options to control how the block is executed.
- * Returns true if the Block started execution.
- */
+ ///
+ /// Execute a child block in the flowchart.
+ /// The block must be in an idle state to be executed.
+ /// This version provides extra options to control how the block is executed.
+ /// Returns true if the Block started execution.
+ ///
public virtual bool ExecuteBlock(Block block, int commandIndex = 0, Action onComplete = null)
{
if (block == null)
@@ -467,9 +484,9 @@ namespace Fungus
return true;
}
- /**
- * Stop all executing Blocks in this Flowchart.
- */
+ ///
+ /// Stop all executing Blocks in this Flowchart.
+ ///
public virtual void StopAllBlocks()
{
Block [] blocks = GetComponents();
@@ -482,10 +499,10 @@ namespace Fungus
}
}
- /**
- * Sends a message to this Flowchart only.
- * Any block with a matching MessageReceived event handler will start executing.
- */
+ ///
+ /// Sends a message to this Flowchart only.
+ /// Any block with a matching MessageReceived event handler will start executing.
+ ///
public virtual void SendFungusMessage(string messageName)
{
MessageReceived[] eventHandlers = GetComponents();
@@ -495,10 +512,10 @@ namespace Fungus
}
}
- /**
- * Sends a message to all Flowchart objects in the current scene.
- * Any block with a matching MessageReceived event handler will start executing.
- */
+ ///
+ /// Sends a message to all Flowchart objects in the current scene.
+ /// Any block with a matching MessageReceived event handler will start executing.
+ ///
public static void BroadcastFungusMessage(string messageName)
{
MessageReceived[] eventHandlers = UnityEngine.Object.FindObjectsOfType();
@@ -508,9 +525,9 @@ namespace Fungus
}
}
- /**
- * Returns a new variable key that is guaranteed not to clash with any existing variable in the list.
- */
+ ///
+ /// Returns a new variable key that is guaranteed not to clash with any existing variable in the list.
+ ///
public virtual string GetUniqueVariableKey(string originalKey, Variable ignoreVariable = null)
{
int suffix = 0;
@@ -537,12 +554,12 @@ namespace Fungus
{
if (variable == null ||
variable == ignoreVariable ||
- variable.key == null)
+ variable.Key == null)
{
continue;
}
- if (variable.key.Equals(key, StringComparison.CurrentCultureIgnoreCase))
+ if (variable.Key.Equals(key, StringComparison.CurrentCultureIgnoreCase))
{
collision = true;
suffix++;
@@ -557,9 +574,9 @@ namespace Fungus
}
}
- /**
- * Returns a new Block key that is guaranteed not to clash with any existing Block in the Flowchart.
- */
+ ///
+ /// Returns a new Block key that is guaranteed not to clash with any existing Block in the Flowchart.
+ ///
public virtual string GetUniqueBlockKey(string originalKey, Block ignoreBlock = null)
{
int suffix = 0;
@@ -580,12 +597,12 @@ namespace Fungus
foreach(Block block in blocks)
{
if (block == ignoreBlock ||
- block.blockName == null)
+ block.BlockName == null)
{
continue;
}
- if (block.blockName.Equals(key, StringComparison.CurrentCultureIgnoreCase))
+ if (block.BlockName.Equals(key, StringComparison.CurrentCultureIgnoreCase))
{
collision = true;
suffix++;
@@ -600,9 +617,9 @@ namespace Fungus
}
}
- /**
- * Returns a new Label key that is guaranteed not to clash with any existing Label in the Block.
- */
+ ///
+ /// Returns a new Label key that is guaranteed not to clash with any existing Label in the Block.
+ ///
public virtual string GetUniqueLabelKey(string originalKey, Label ignoreLabel)
{
int suffix = 0;
@@ -614,13 +631,13 @@ namespace Fungus
baseKey = "New Label";
}
- Block block = ignoreLabel.parentBlock;
+ Block block = ignoreLabel.ParentBlock;
string key = baseKey;
while (true)
{
bool collision = false;
- foreach(Command command in block.commandList)
+ foreach(Command command in block.CommandList)
{
Label label = command as Label;
if (label == null ||
@@ -629,7 +646,7 @@ namespace Fungus
continue;
}
- if (label.key.Equals(key, StringComparison.CurrentCultureIgnoreCase))
+ if (label.Key.Equals(key, StringComparison.CurrentCultureIgnoreCase))
{
collision = true;
suffix++;
@@ -643,19 +660,19 @@ namespace Fungus
}
}
}
-
- /**
- * Returns the variable with the specified key, or null if the key is not found.
- * You will need to cast the returned variable to the correct sub-type.
- * You can then access the variable's value using the Value property. e.g.
- * BooleanVariable boolVar = flowchart.GetVariable("MyBool") as BooleanVariable;
- * boolVar.Value = false;
- */
+
+ ///
+ /// Returns the variable with the specified key, or null if the key is not found.
+ /// You will need to cast the returned variable to the correct sub-type.
+ /// You can then access the variable's value using the Value property. e.g.
+ /// BooleanVariable boolVar = flowchart.GetVariable("MyBool") as BooleanVariable;
+ /// boolVar.Value = false;
+ ///
public Variable GetVariable(string key)
{
foreach (Variable variable in variables)
{
- if (variable != null && variable.key == key)
+ if (variable != null && variable.Key == key)
{
return variable;
}
@@ -664,17 +681,17 @@ namespace Fungus
return null;
}
- /**
- * Returns the variable with the specified key, or null if the key is not found.
- * You can then access the variable's value using the Value property. e.g.
- * BooleanVariable boolVar = flowchart.GetVariable("MyBool");
- * boolVar.Value = false;
- */
+ ///
+ /// Returns the variable with the specified key, or null if the key is not found.
+ /// You can then access the variable's value using the Value property. e.g.
+ /// BooleanVariable boolVar = flowchart.GetVariable("MyBool");
+ /// boolVar.Value = false;
+ ///
public T GetVariable(string key) where T : Variable
{
foreach (Variable variable in variables)
{
- if (variable != null && variable.key == key)
+ if (variable != null && variable.Key == key)
{
return variable as T;
}
@@ -684,15 +701,15 @@ namespace Fungus
return null;
}
- /**
- * Register a new variable with the Flowchart at runtime.
- * The variable should be added as a component on the Flowchart game object.
- */
+ ///
+ /// Register a new variable with the Flowchart at runtime.
+ /// The variable should be added as a component on the Flowchart game object.
+ ///
public void SetVariable(string key, T newvariable) where T : Variable
{
foreach (Variable v in variables)
{
- if (v != null && v.key == key)
+ if (v != null && v.Key == key)
{
T variable = v as T;
if (variable != null)
@@ -706,15 +723,15 @@ namespace Fungus
Debug.LogWarning("Variable " + key + " not found.");
}
- /**
- * Gets a list of all variables with public scope in this Flowchart.
- */
+ ///
+ /// Gets a list of all variables with public scope in this Flowchart.
+ ///
public virtual List GetPublicVariables()
{
List publicVariables = new List();
foreach (Variable v in variables)
{
- if (v != null && v.scope == VariableScope.Public)
+ if (v != null && v.Scope == VariableScope.Public)
{
publicVariables.Add(v);
}
@@ -723,17 +740,17 @@ namespace Fungus
return publicVariables;
}
- /**
- * Gets the value of a boolean variable.
- * Returns false if the variable key does not exist.
- */
+ ///
+ /// Gets the value of a boolean variable.
+ /// Returns false if the variable key does not exist.
+ ///
public virtual bool GetBooleanVariable(string key)
{
BooleanVariable variable = GetVariable(key);
if(variable != null)
{
- return GetVariable(key).value;
+ return GetVariable(key).Value;
}
else
{
@@ -741,30 +758,30 @@ namespace Fungus
}
}
- /**
- * Sets the value of a boolean variable.
- * The variable must already be added to the list of variables for this Flowchart.
- */
+ ///
+ /// Sets the value of a boolean variable.
+ /// The variable must already be added to the list of variables for this Flowchart.
+ ///
public virtual void SetBooleanVariable(string key, bool value)
{
BooleanVariable variable = GetVariable(key);
if(variable != null)
{
- variable.value = value;
+ variable.Value = value;
}
}
- /**
- * Gets the value of an integer variable.
- * Returns 0 if the variable key does not exist.
- */
+ ///
+ /// Gets the value of an integer variable.
+ /// Returns 0 if the variable key does not exist.
+ ///
public virtual int GetIntegerVariable(string key)
{
IntegerVariable variable = GetVariable(key);
if (variable != null)
{
- return GetVariable(key).value;
+ return GetVariable(key).Value;
}
else
{
@@ -772,30 +789,30 @@ namespace Fungus
}
}
- /**
- * Sets the value of an integer variable.
- * The variable must already be added to the list of variables for this Flowchart.
- */
+ ///
+ /// Sets the value of an integer variable.
+ /// The variable must already be added to the list of variables for this Flowchart.
+ ///
public virtual void SetIntegerVariable(string key, int value)
{
IntegerVariable variable = GetVariable(key);
if (variable != null)
{
- variable.value = value;
+ variable.Value = value;
}
}
- /**
- * Gets the value of a float variable.
- * Returns 0 if the variable key does not exist.
- */
+ ///
+ /// Gets the value of a float variable.
+ /// Returns 0 if the variable key does not exist.
+ ///
public virtual float GetFloatVariable(string key)
{
FloatVariable variable = GetVariable(key);
if (variable != null)
{
- return GetVariable(key).value;
+ return GetVariable(key).Value;
}
else
{
@@ -803,30 +820,30 @@ namespace Fungus
}
}
- /**
- * Sets the value of a float variable.
- * The variable must already be added to the list of variables for this Flowchart.
- */
+ ///
+ /// Sets the value of a float variable.
+ /// The variable must already be added to the list of variables for this Flowchart.
+ ///
public virtual void SetFloatVariable(string key, float value)
{
FloatVariable variable = GetVariable(key);
if (variable != null)
{
- variable.value = value;
+ variable.Value = value;
}
}
- /**
- * Gets the value of a string variable.
- * Returns the empty string if the variable key does not exist.
- */
+ ///
+ /// Gets the value of a string variable.
+ /// Returns the empty string if the variable key does not exist.
+ ///
public virtual string GetStringVariable(string key)
{
StringVariable variable = GetVariable(key);
if (variable != null)
{
- return GetVariable(key).value;
+ return GetVariable(key).Value;
}
else
{
@@ -834,22 +851,22 @@ namespace Fungus
}
}
- /**
- * Sets the value of a string variable.
- * The variable must already be added to the list of variables for this Flowchart.
- */
+ ///
+ /// Sets the value of a string variable.
+ /// The variable must already be added to the list of variables for this Flowchart.
+ ///
public virtual void SetStringVariable(string key, string value)
{
StringVariable variable = GetVariable(key);
if (variable != null)
{
- variable.value = value;
+ variable.Value = value;
}
}
- /**
- * Set the block objects to be hidden or visible depending on the hideComponents property.
- */
+ ///
+ /// Set the block objects to be hidden or visible depending on the hideComponents property.
+ ///
public virtual void UpdateHideFlags()
{
if (hideComponents)
@@ -893,11 +910,17 @@ namespace Fungus
}
+ ///
+ /// Clears the list of selected commands.
+ ///
public virtual void ClearSelectedCommands()
{
selectedCommands.Clear();
}
-
+
+ ///
+ /// Adds a command to the list of selected commands.
+ ///
public virtual void AddSelectedCommand(Command command)
{
if (!selectedCommands.Contains(command))
@@ -906,6 +929,9 @@ namespace Fungus
}
}
+ ///
+ /// Reset the commands and variables in the Flowchart.
+ ///
public virtual void Reset(bool resetCommands, bool resetVariables)
{
if (resetCommands)
@@ -926,9 +952,9 @@ namespace Fungus
}
}
- /**
- * Override this in a Flowchart subclass to filter which commands are shown in the Add Command list.
- */
+ ///
+ /// Override this in a Flowchart subclass to filter which commands are shown in the Add Command list.
+ ///
public virtual bool IsCommandSupported(CommandInfoAttribute commandInfo)
{
foreach (string key in hideCommands)
@@ -944,9 +970,9 @@ namespace Fungus
return true;
}
- /**
- * Returns true if there are any executing blocks in this Flowchart.
- */
+ ///
+ /// Returns true if there are any executing blocks in this Flowchart.
+ ///
public virtual bool HasExecutingBlocks()
{
Block[] blocks = GetComponents();
@@ -960,9 +986,9 @@ namespace Fungus
return false;
}
- /**
- * Returns a list of all executing blocks in this Flowchart.
- */
+ ///
+ /// Returns a list of all executing blocks in this Flowchart.
+ ///
public virtual List GetExecutingBlocks()
{
List executingBlocks = new List();
@@ -979,11 +1005,11 @@ namespace Fungus
return executingBlocks;
}
- /**
- * Implementation of StringSubstituter.ISubstitutionHandler which matches any public variable in the Flowchart.
- * To perform full variable substitution with all substitution handlers in the scene, you should
- * use the SubstituteVariables() method instead.
- */
+ ///
+ /// Implementation of StringSubstituter.ISubstitutionHandler which matches any public variable in the Flowchart.
+ /// To perform full variable substitution with all substitution handlers in the scene, you should
+ /// use the SubstituteVariables() method instead.
+ ///
[MoonSharp.Interpreter.MoonSharpHidden]
public virtual bool SubstituteStrings(StringBuilder input)
{
@@ -1004,8 +1030,8 @@ namespace Fungus
if (variable == null)
continue;
- if (variable.scope == VariableScope.Public &&
- variable.key == key)
+ if (variable.Scope == VariableScope.Public &&
+ variable.Key == key)
{
string value = variable.ToString();
input.Replace(match.Value, value);
@@ -1018,12 +1044,12 @@ namespace Fungus
return modified;
}
- /**
- * Substitute variables in the input text with the format {$VarName}
- * This will first match with private variables in this Flowchart, and then
- * with public variables in all Flowcharts in the scene (and any component
- * in the scene that implements StringSubstituter.ISubstitutionHandler).
- */
+ ///
+ /// Substitute variables in the input text with the format {$VarName}
+ /// This will first match with private variables in this Flowchart, and then
+ /// with public variables in all Flowcharts in the scene (and any component
+ /// in the scene that implements StringSubstituter.ISubstitutionHandler).
+ ///
public virtual string SubstituteVariables(string input)
{
if (stringSubstituer == null)
@@ -1032,7 +1058,7 @@ namespace Fungus
}
// Use the string builder from StringSubstituter for efficiency.
- StringBuilder sb = stringSubstituer.stringBuilder;
+ StringBuilder sb = stringSubstituer._StringBuilder;
sb.Length = 0;
sb.Append(input);
@@ -1053,8 +1079,8 @@ namespace Fungus
if (variable == null)
continue;
- if (variable.scope == VariableScope.Private &&
- variable.key == key)
+ if (variable.Scope == VariableScope.Private &&
+ variable.Key == key)
{
string value = variable.ToString();
sb.Replace(match.Value, value);
@@ -1076,5 +1102,4 @@ namespace Fungus
}
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/FungusState.cs b/Assets/Fungus/Flowchart/Scripts/FungusState.cs
index 5ae21d8e..fa68f95c 100644
--- a/Assets/Fungus/Flowchart/Scripts/FungusState.cs
+++ b/Assets/Fungus/Flowchart/Scripts/FungusState.cs
@@ -1,20 +1,18 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
-
- // Used by the Flowchart window to serialize the currently active Flowchart object
- // so that the same Flowchart can be displayed while editing & playing.
+ ///
+ /// Used by the Flowchart window to serialize the currently active Flowchart object
+ /// so that the same Flowchart can be displayed while editing & playing.
+ ///
[AddComponentMenu("")]
public class FungusState : MonoBehaviour
{
- public Flowchart selectedFlowchart;
+ [SerializeField] protected Flowchart selectedFlowchart;
+ public Flowchart SelectedFlowchart { get { return selectedFlowchart; } set { selectedFlowchart = value; } }
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Node.cs b/Assets/Fungus/Flowchart/Scripts/Node.cs
index fbc013da..ad5221f3 100644
--- a/Assets/Fungus/Flowchart/Scripts/Node.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Node.cs
@@ -1,18 +1,17 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
-
+ ///
+ /// Base class for Flowchart nodes.
+ ///
[AddComponentMenu("")]
public class Node : MonoBehaviour
{
- public Rect nodeRect = new Rect(0, 0, 120, 30);
+ [SerializeField] protected Rect nodeRect = new Rect(0, 0, 120, 30);
+ public Rect _NodeRect { get { return nodeRect; } set { nodeRect = value; } }
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs b/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs
index c5fbe60d..74b8796f 100644
--- a/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs
+++ b/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
#if UNITY_5_0 || UNITY_5_1 || UNITY_5_2
@@ -9,27 +7,26 @@
using UnityEngine.SceneManagement;
#endif
using System.Collections;
-using System;
namespace Fungus
{
- /**
- * Helper component for loading a new scene.
- * A fullscreen loading image is displayed while loading the new scene.
- * All Rooms are destroyed and unused assets are released from memory before loading the new scene to minimize memory footprint.
- * For streaming Web Player builds, the loading image will be displayed until the requested level has finished downloading.
- */
+ ///
+ /// Helper component for loading a new scene.
+ /// A fullscreen loading image is displayed while loading the new scene.
+ /// All Rooms are destroyed and unused assets are released from memory before loading the new scene to minimize memory footprint.
+ /// For streaming Web Player builds, the loading image will be displayed until the requested level has finished downloading.
+ ///
public class SceneLoader : MonoBehaviour
{
protected Texture2D loadingTexture;
protected string sceneToLoad;
protected bool displayedImage;
- /**
- * Asynchronously load a new scene.
- * @param _sceneToLoad The name of the scene to load. Scenes must be added in project build settings.
- * @param _loadingTexture Loading image to display while loading the new scene.
- */
+ ///
+ /// Asynchronously load a new scene.
+ ///
+ /// The name of the scene to load. Scenes must be added in project build settings.
+ /// Loading image to display while loading the new scene.
static public void LoadScene(string _sceneToLoad, Texture2D _loadingTexture)
{
// Unity does not provide a way to check if the named scene actually exists in the project.
diff --git a/Assets/Fungus/Flowchart/Scripts/StringFormatter.cs b/Assets/Fungus/Flowchart/Scripts/StringFormatter.cs
index bd35dd35..5168f6fa 100644
--- a/Assets/Fungus/Flowchart/Scripts/StringFormatter.cs
+++ b/Assets/Fungus/Flowchart/Scripts/StringFormatter.cs
@@ -1,16 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
-using UnityEngine;
-using System.IO;
-using System.Collections;
using System.Text;
using System;
namespace Fungus
{
+ ///
+ /// Misc string formatting functions.
+ ///
public class StringFormatter
{
public static string[] FormatEnumNames(Enum e, string firstLabel)
@@ -58,6 +56,5 @@ namespace Fungus
}
return true;
}
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/Variable.cs b/Assets/Fungus/Flowchart/Scripts/Variable.cs
index f8a7645f..27dbf92d 100644
--- a/Assets/Fungus/Flowchart/Scripts/Variable.cs
+++ b/Assets/Fungus/Flowchart/Scripts/Variable.cs
@@ -1,21 +1,23 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Scope types for Variables.
+ ///
public enum VariableScope
{
Private,
Public
}
+ ///
+ /// Attribute class for variables.
+ ///
public class VariableInfoAttribute : Attribute
{
public VariableInfoAttribute(string category, string variableType, int order = 0)
@@ -30,6 +32,9 @@ namespace Fungus
public int Order { get; set; }
}
+ ///
+ /// Attribute class for variable properties.
+ ///
public class VariablePropertyAttribute : PropertyAttribute
{
public VariablePropertyAttribute (params System.Type[] variableTypes)
@@ -48,36 +53,45 @@ namespace Fungus
public System.Type[] VariableTypes { get; set; }
}
+ ///
+ /// Abstract base class for variables.
+ ///
[RequireComponent(typeof(Flowchart))]
public abstract class Variable : MonoBehaviour
{
- public VariableScope scope;
+ [SerializeField] protected VariableScope scope;
+ public VariableScope Scope { get { return scope; } }
- public string key = "";
+ [SerializeField] protected string key = "";
+ public string Key { get { return key; } set { key = value; } }
public abstract void OnReset();
}
+ ///
+ /// Generic concrete base class for variables.
+ ///
public abstract class VariableBase : Variable
{
- public T value;
+ [SerializeField] protected T value;
+ public T Value { get { return this.value; } set { this.value = value; } }
protected T startValue;
public override void OnReset()
{
- value = startValue;
+ Value = startValue;
}
public override string ToString()
{
- return value.ToString();
+ return Value.ToString();
}
protected virtual void Start()
{
// Remember the initial value so we can reset later on
- startValue = value;
+ startValue = Value;
}
}
}
diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/AnimatorVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/AnimatorVariable.cs
index 5e59691b..4747a5ad 100644
--- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/AnimatorVariable.cs
+++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/AnimatorVariable.cs
@@ -1,19 +1,22 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Animator variable type.
+ ///
[VariableInfo("Other", "Animator")]
[AddComponentMenu("")]
[System.Serializable]
public class AnimatorVariable : VariableBase
{}
+ ///
+ /// Container for an Animator variable reference or constant value.
+ ///
[System.Serializable]
public struct AnimatorData
{
@@ -37,8 +40,8 @@ namespace Fungus
public Animator Value
{
- get { return (animatorRef == null) ? animatorVal : animatorRef.value; }
- set { if (animatorRef == null) { animatorVal = value; } else { animatorRef.value = value; } }
+ get { return (animatorRef == null) ? animatorVal : animatorRef.Value; }
+ set { if (animatorRef == null) { animatorVal = value; } else { animatorRef.Value = value; } }
}
public string GetDescription()
@@ -49,9 +52,8 @@ namespace Fungus
}
else
{
- return animatorRef.key;
+ return animatorRef.Key;
}
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/AudioSourceVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/AudioSourceVariable.cs
index d65ff6e1..a3e4bb34 100644
--- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/AudioSourceVariable.cs
+++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/AudioSourceVariable.cs
@@ -1,19 +1,22 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// AudioSource variable type.
+ ///
[VariableInfo("Other", "AudioSource")]
[AddComponentMenu("")]
[System.Serializable]
public class AudioSourceVariable : VariableBase
{}
+ ///
+ /// Container for an AudioSource variable reference or constant value.
+ ///
[System.Serializable]
public struct AudioSourceData
{
@@ -37,8 +40,8 @@ namespace Fungus
public AudioSource Value
{
- get { return (audioSourceRef == null) ? audioSourceVal : audioSourceRef.value; }
- set { if (audioSourceRef == null) { audioSourceVal = value; } else { audioSourceRef.value = value; } }
+ get { return (audioSourceRef == null) ? audioSourceVal : audioSourceRef.Value; }
+ set { if (audioSourceRef == null) { audioSourceVal = value; } else { audioSourceRef.Value = value; } }
}
public string GetDescription()
@@ -49,9 +52,8 @@ namespace Fungus
}
else
{
- return audioSourceRef.key;
+ return audioSourceRef.Key;
}
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/BooleanVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/BooleanVariable.cs
index 939da10f..0553e094 100644
--- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/BooleanVariable.cs
+++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/BooleanVariable.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System;
@@ -9,7 +7,9 @@ using System.Collections;
namespace Fungus
{
-
+ ///
+ /// Boolean variable type.
+ ///
[VariableInfo("", "Boolean")]
[AddComponentMenu("")]
[System.Serializable]
@@ -19,7 +19,7 @@ namespace Fungus
{
bool condition = false;
- bool lhs = value;
+ bool lhs = Value;
bool rhs = booleanValue;
switch (compareOperator)
@@ -38,6 +38,9 @@ namespace Fungus
}
+ ///
+ /// Container for a Boolean variable reference or constant value.
+ ///
[System.Serializable]
public struct BooleanData
{
@@ -61,8 +64,8 @@ namespace Fungus
public bool Value
{
- get { return (booleanRef == null) ? booleanVal : booleanRef.value; }
- set { if (booleanRef == null) { booleanVal = value; } else { booleanRef.value = value; } }
+ get { return (booleanRef == null) ? booleanVal : booleanRef.Value; }
+ set { if (booleanRef == null) { booleanVal = value; } else { booleanRef.Value = value; } }
}
public string GetDescription()
@@ -73,9 +76,8 @@ namespace Fungus
}
else
{
- return booleanRef.key;
+ return booleanRef.Key;
}
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/ColorVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/ColorVariable.cs
index d14c28c2..f27c32ca 100644
--- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/ColorVariable.cs
+++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/ColorVariable.cs
@@ -1,19 +1,23 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
namespace Fungus
{
+ ///
+ /// Color variable type.
+ ///
[VariableInfo("Other", "Color")]
[AddComponentMenu("")]
[System.Serializable]
public class ColorVariable : VariableBase
{}
+ ///
+ /// Container for a Color variable reference or constant value.
+ ///
[System.Serializable]
public struct ColorData
{
@@ -37,8 +41,8 @@ namespace Fungus
public Color Value
{
- get { return (colorRef == null) ? colorVal : colorRef.value; }
- set { if (colorRef == null) { colorVal = value; } else { colorRef.value = value; } }
+ get { return (colorRef == null) ? colorVal : colorRef.Value; }
+ set { if (colorRef == null) { colorVal = value; } else { colorRef.Value = value; } }
}
public string GetDescription()
@@ -49,9 +53,8 @@ namespace Fungus
}
else
{
- return colorRef.key;
+ return colorRef.Key;
}
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/FloatVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/FloatVariable.cs
index cf842778..8c4fe570 100644
--- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/FloatVariable.cs
+++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/FloatVariable.cs
@@ -1,13 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
namespace Fungus
{
+ ///
+ /// Float variable type.
+ ///
[VariableInfo("", "Float")]
[AddComponentMenu("")]
[System.Serializable]
@@ -15,7 +16,7 @@ namespace Fungus
{
public virtual bool Evaluate(CompareOperator compareOperator, float floatValue)
{
- float lhs = value;
+ float lhs = Value;
float rhs = floatValue;
bool condition = false;
@@ -46,6 +47,9 @@ namespace Fungus
}
}
+ ///
+ /// Container for an float variable reference or constant value.
+ ///
[System.Serializable]
public struct FloatData
{
@@ -69,8 +73,8 @@ namespace Fungus
public float Value
{
- get { return (floatRef == null) ? floatVal : floatRef.value; }
- set { if (floatRef == null) { floatVal = value; } else { floatRef.value = value; } }
+ get { return (floatRef == null) ? floatVal : floatRef.Value; }
+ set { if (floatRef == null) { floatVal = value; } else { floatRef.Value = value; } }
}
public string GetDescription()
@@ -81,9 +85,8 @@ namespace Fungus
}
else
{
- return floatRef.key;
+ return floatRef.Key;
}
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/GameObjectVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/GameObjectVariable.cs
index 9aaba0ca..8a67c671 100644
--- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/GameObjectVariable.cs
+++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/GameObjectVariable.cs
@@ -1,19 +1,23 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
namespace Fungus
{
+ ///
+ /// GameObject variable type.
+ ///
[VariableInfo("Other", "GameObject")]
[AddComponentMenu("")]
[System.Serializable]
public class GameObjectVariable : VariableBase
{}
+ ///
+ /// Container for a GameObject variable reference or constant value.
+ ///
[System.Serializable]
public struct GameObjectData
{
@@ -37,8 +41,8 @@ namespace Fungus
public GameObject Value
{
- get { return (gameObjectRef == null) ? gameObjectVal : gameObjectRef.value; }
- set { if (gameObjectRef == null) { gameObjectVal = value; } else { gameObjectRef.value = value; } }
+ get { return (gameObjectRef == null) ? gameObjectVal : gameObjectRef.Value; }
+ set { if (gameObjectRef == null) { gameObjectVal = value; } else { gameObjectRef.Value = value; } }
}
public string GetDescription()
@@ -49,9 +53,8 @@ namespace Fungus
}
else
{
- return gameObjectRef.key;
+ return gameObjectRef.Key;
}
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/IntegerVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/IntegerVariable.cs
index 47ec0f2b..e91968ff 100644
--- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/IntegerVariable.cs
+++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/IntegerVariable.cs
@@ -1,13 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
namespace Fungus
{
+ ///
+ /// Integer variable type.
+ ///
[VariableInfo("", "Integer")]
[AddComponentMenu("")]
[System.Serializable]
@@ -15,7 +16,7 @@ namespace Fungus
{
public virtual bool Evaluate(CompareOperator compareOperator, int integerValue)
{
- int lhs = value;
+ int lhs = Value;
int rhs = integerValue;
bool condition = false;
@@ -46,6 +47,9 @@ namespace Fungus
}
}
+ ///
+ /// Container for an integer variable reference or constant value.
+ ///
[System.Serializable]
public struct IntegerData
{
@@ -69,8 +73,8 @@ namespace Fungus
public int Value
{
- get { return (integerRef == null) ? integerVal : integerRef.value; }
- set { if (integerRef == null) { integerVal = value; } else { integerRef.value = value; } }
+ get { return (integerRef == null) ? integerVal : integerRef.Value; }
+ set { if (integerRef == null) { integerVal = value; } else { integerRef.Value = value; } }
}
public string GetDescription()
@@ -81,9 +85,8 @@ namespace Fungus
}
else
{
- return integerRef.key;
+ return integerRef.Key;
}
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/MaterialVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/MaterialVariable.cs
index 7ccb0a79..5f36ff87 100644
--- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/MaterialVariable.cs
+++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/MaterialVariable.cs
@@ -1,19 +1,23 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
namespace Fungus
{
+ ///
+ /// Material variable type.
+ ///
[VariableInfo("Other", "Material")]
[AddComponentMenu("")]
[System.Serializable]
public class MaterialVariable : VariableBase
{}
+ ///
+ /// Container for a Material variable reference or constant value.
+ ///
[System.Serializable]
public struct MaterialData
{
@@ -37,8 +41,8 @@ namespace Fungus
public Material Value
{
- get { return (materialRef == null) ? materialVal : materialRef.value; }
- set { if (materialRef == null) { materialVal = value; } else { materialRef.value = value; } }
+ get { return (materialRef == null) ? materialVal : materialRef.Value; }
+ set { if (materialRef == null) { materialVal = value; } else { materialRef.Value = value; } }
}
public string GetDescription()
@@ -49,9 +53,8 @@ namespace Fungus
}
else
{
- return materialRef.key;
+ return materialRef.Key;
}
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/ObjectVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/ObjectVariable.cs
index ee890185..1d3fcb9d 100644
--- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/ObjectVariable.cs
+++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/ObjectVariable.cs
@@ -1,19 +1,23 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
namespace Fungus
{
+ ///
+ /// Object variable type.
+ ///
[VariableInfo("Other", "Object")]
[AddComponentMenu("")]
[System.Serializable]
public class ObjectVariable : VariableBase
public static IEnumerator ShowTimer(this MenuDialog menuDialog, float duration, LuaEnvironment luaEnvironment, Closure callBack)
{
- if (menuDialog.cachedSlider == null ||
+ if (menuDialog.CachedSlider == null ||
duration <= 0f)
{
yield break;
}
- menuDialog.cachedSlider.gameObject.SetActive(true);
+ menuDialog.CachedSlider.gameObject.SetActive(true);
menuDialog.StopAllCoroutines();
float elapsedTime = 0;
@@ -100,5 +98,4 @@ namespace Fungus
}
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Narrative/Editor/CharacterEditor.cs b/Assets/Fungus/Narrative/Editor/CharacterEditor.cs
index 9d5c8014..69b290a7 100644
--- a/Assets/Fungus/Narrative/Editor/CharacterEditor.cs
+++ b/Assets/Fungus/Narrative/Editor/CharacterEditor.cs
@@ -1,17 +1,12 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
using UnityEngine;
-using System.Collections;
using Rotorz.ReorderableList;
-using System.Collections.Generic;
namespace Fungus
{
-
[CustomEditor (typeof(Character))]
public class CharacterEditor : Editor
{
@@ -46,19 +41,19 @@ namespace Fungus
EditorGUILayout.PropertyField(setSayDialogProp);
EditorGUILayout.PropertyField(descriptionProp, new GUIContent("Description", "Notes about this story character (personality, attibutes, etc.)"));
- if (t.portraits != null &&
- t.portraits.Count > 0)
+ if (t.Portraits != null &&
+ t.Portraits.Count > 0)
{
- t.profileSprite = t.portraits[0];
+ t.ProfileSprite = t.Portraits[0];
}
else
{
- t.profileSprite = null;
+ t.ProfileSprite = null;
}
- if (t.profileSprite != null)
+ if (t.ProfileSprite != null)
{
- Texture2D characterTexture = t.profileSprite.texture;
+ Texture2D characterTexture = t.ProfileSprite.texture;
float aspect = (float)characterTexture.width / (float)characterTexture.height;
Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true));
if (characterTexture != null)
@@ -88,5 +83,4 @@ namespace Fungus
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Narrative/Editor/LocalizationEditor.cs b/Assets/Fungus/Narrative/Editor/LocalizationEditor.cs
index 29dfa78a..20f499e4 100644
--- a/Assets/Fungus/Narrative/Editor/LocalizationEditor.cs
+++ b/Assets/Fungus/Narrative/Editor/LocalizationEditor.cs
@@ -1,18 +1,12 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
using System.IO;
-using Rotorz.ReorderableList;
namespace Fungus
{
-
[CustomEditor(typeof(Localization))]
public class LocalizationEditor : Editor
{
@@ -78,7 +72,7 @@ namespace Fungus
TextAsset textAsset = AssetDatabase.LoadAssetAtPath(path, typeof(TextAsset)) as TextAsset;
if (textAsset != null)
{
- localization.localizationFile = textAsset;
+ localization.LocalizationFile = textAsset;
}
ShowNotification(localization);
@@ -119,9 +113,8 @@ namespace Fungus
protected virtual void ShowNotification(Localization localization)
{
- FlowchartWindow.ShowNotification(localization.notificationText);
- localization.notificationText = "";
+ FlowchartWindow.ShowNotification(localization.NotificationText);
+ localization.NotificationText = "";
}
}
-
}
diff --git a/Assets/Fungus/Narrative/Editor/MenuEditor.cs b/Assets/Fungus/Narrative/Editor/MenuEditor.cs
index a5b2a509..60f9a001 100644
--- a/Assets/Fungus/Narrative/Editor/MenuEditor.cs
+++ b/Assets/Fungus/Narrative/Editor/MenuEditor.cs
@@ -1,17 +1,11 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
using UnityEngine;
-using System;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
-
[CustomEditor (typeof(Fungus.Menu))]
public class MenuEditor : CommandEditor
{
@@ -60,6 +54,5 @@ namespace Fungus
serializedObject.ApplyModifiedProperties();
}
- }
-
+ }
}
diff --git a/Assets/Fungus/Narrative/Editor/MenuTimerEditor.cs b/Assets/Fungus/Narrative/Editor/MenuTimerEditor.cs
index e4e1a881..37e0bcee 100644
--- a/Assets/Fungus/Narrative/Editor/MenuTimerEditor.cs
+++ b/Assets/Fungus/Narrative/Editor/MenuTimerEditor.cs
@@ -1,13 +1,8 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
using UnityEngine;
-using System;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
diff --git a/Assets/Fungus/Narrative/Editor/NarrativeMenuItems.cs b/Assets/Fungus/Narrative/Editor/NarrativeMenuItems.cs
index 14f219c1..41420b7f 100644
--- a/Assets/Fungus/Narrative/Editor/NarrativeMenuItems.cs
+++ b/Assets/Fungus/Narrative/Editor/NarrativeMenuItems.cs
@@ -1,15 +1,11 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEditor;
-using System.Collections;
namespace Fungus
{
-
// The prefab names are prefixed with Fungus to avoid clashes with any other prefabs in the project
public class NarrativeMenuItems
{
@@ -69,5 +65,4 @@ namespace Fungus
go.transform.position = Vector3.zero;
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Narrative/Editor/PortraitEditor.cs b/Assets/Fungus/Narrative/Editor/PortraitEditor.cs
index 7d6dff32..ba0df85b 100644
--- a/Assets/Fungus/Narrative/Editor/PortraitEditor.cs
+++ b/Assets/Fungus/Narrative/Editor/PortraitEditor.cs
@@ -1,22 +1,11 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
-using UnityEditorInternal;
using UnityEngine;
-using UnityEngine.UI;
-using UnityEngine.Events;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using Rotorz.ReorderableList;
-
namespace Fungus
{
-
[CustomEditor (typeof(Portrait))]
public class PortraitEditor : CommandEditor
{
@@ -75,14 +64,14 @@ namespace Fungus
}
else
{
- t.stage = null;
+ t._Stage = null;
}
// Format Enum names
- string[] displayLabels = StringFormatter.FormatEnumNames(t.display,"");
+ string[] displayLabels = StringFormatter.FormatEnumNames(t.Display,"");
displayProp.enumValueIndex = EditorGUILayout.Popup("Display", (int)displayProp.enumValueIndex, displayLabels);
string characterLabel = "Character";
- if (t.display == DisplayType.Replace)
+ if (t.Display == DisplayType.Replace)
{
CommandEditor.ObjectField(replacedCharacterProp,
new GUIContent("Replace", "Character to replace"),
@@ -97,19 +86,19 @@ namespace Fungus
Character.activeCharacters);
bool showOptionalFields = true;
- Stage s = t.stage;
+ Stage s = t._Stage;
// Only show optional portrait fields once required fields have been filled...
- if (t.character != null) // Character is selected
+ if (t._Character != null) // Character is selected
{
- if (t.character.portraits == null || // Character has a portraits field
- t.character.portraits.Count <= 0 ) // Character has at least one portrait
+ if (t._Character.Portraits == null || // Character has a portraits field
+ t._Character.Portraits.Count <= 0 ) // Character has at least one portrait
{
EditorGUILayout.HelpBox("This character has no portraits. Please add portraits to the character's prefab before using this command.", MessageType.Error);
showOptionalFields = false;
}
- if (t.stage == null) // If default portrait stage selected
+ if (t._Stage == null) // If default portrait stage selected
{
- if (t.stage == null) // If no default specified, try to get any portrait stage in the scene
+ if (t._Stage == null) // If no default specified, try to get any portrait stage in the scene
{
s = GameObject.FindObjectOfType();
}
@@ -120,16 +109,16 @@ namespace Fungus
showOptionalFields = false;
}
}
- if (t.display != DisplayType.None && t.character != null && showOptionalFields)
+ if (t.Display != DisplayType.None && t._Character != null && showOptionalFields)
{
- if (t.display != DisplayType.Hide && t.display != DisplayType.MoveToFront)
+ if (t.Display != DisplayType.Hide && t.Display != DisplayType.MoveToFront)
{
// PORTRAIT
CommandEditor.ObjectField(portraitProp,
new GUIContent("Portrait", "Portrait representing character"),
new GUIContent(""),
- t.character.portraits);
- if (t.character.portraitsFace != FacingDirection.None)
+ t._Character.Portraits);
+ if (t._Character.PortraitsFace != FacingDirection.None)
{
// FACING
// Display the values of the facing enum as <-- and --> arrows to avoid confusion with position field
@@ -143,91 +132,91 @@ namespace Fungus
}
else
{
- t.facing = FacingDirection.None;
+ t.Facing = FacingDirection.None;
}
}
else
{
- t.portrait = null;
- t.facing = FacingDirection.None;
+ t._Portrait = null;
+ t.Facing = FacingDirection.None;
}
string toPositionPrefix = "";
- if (t.move)
+ if (t.Move)
{
// MOVE
EditorGUILayout.PropertyField(moveProp);
}
- if (t.move)
+ if (t.Move)
{
- if (t.display != DisplayType.Hide)
+ if (t.Display != DisplayType.Hide)
{
// START FROM OFFSET
EditorGUILayout.PropertyField(shiftIntoPlaceProp);
}
}
- if (t.move)
+ if (t.Move)
{
- if (t.display != DisplayType.Hide)
+ if (t.Display != DisplayType.Hide)
{
- if (t.shiftIntoPlace)
+ if (t.ShiftIntoPlace)
{
- t.fromPosition = null;
+ t.FromPosition = null;
// OFFSET
// Format Enum names
- string[] offsetLabels = StringFormatter.FormatEnumNames(t.offset,"");
+ string[] offsetLabels = StringFormatter.FormatEnumNames(t.Offset,"");
offsetProp.enumValueIndex = EditorGUILayout.Popup("From Offset", (int)offsetProp.enumValueIndex, offsetLabels);
}
else
{
- t.offset = PositionOffset.None;
+ t.Offset = PositionOffset.None;
// FROM POSITION
CommandEditor.ObjectField(fromPositionProp,
new GUIContent("From Position", "Move the portrait to this position"),
new GUIContent(""),
- s.positions);
+ s.Positions);
}
}
toPositionPrefix = "To ";
}
else
{
- t.shiftIntoPlace = false;
- t.fromPosition = null;
+ t.ShiftIntoPlace = false;
+ t.FromPosition = null;
toPositionPrefix = "At ";
}
- if (t.display == DisplayType.Show || (t.display == DisplayType.Hide && t.move) )
+ if (t.Display == DisplayType.Show || (t.Display == DisplayType.Hide && t.Move) )
{
// TO POSITION
CommandEditor.ObjectField(toPositionProp,
new GUIContent(toPositionPrefix+"Position", "Move the portrait to this position"),
new GUIContent(""),
- s.positions);
+ s.Positions);
}
else
{
- t.toPosition = null;
+ t.ToPosition = null;
}
- if (!t.move && t.display != DisplayType.MoveToFront)
+ if (!t.Move && t.Display != DisplayType.MoveToFront)
{
// MOVE
EditorGUILayout.PropertyField(moveProp);
}
- if (t.display != DisplayType.MoveToFront)
+ if (t.Display != DisplayType.MoveToFront)
{
EditorGUILayout.Separator();
// USE DEFAULT SETTINGS
EditorGUILayout.PropertyField(useDefaultSettingsProp);
- if (!t.useDefaultSettings) {
+ if (!t.UseDefaultSettings) {
// FADE DURATION
EditorGUILayout.PropertyField(fadeDurationProp);
- if (t.move)
+ if (t.Move)
{
// MOVE SPEED
EditorGUILayout.PropertyField(moveDurationProp);
}
- if (t.shiftIntoPlace)
+ if (t.ShiftIntoPlace)
{
// SHIFT OFFSET
EditorGUILayout.PropertyField(shiftOffsetProp);
@@ -236,17 +225,17 @@ namespace Fungus
}
else
{
- t.move = false;
- t.useDefaultSettings = true;
+ t.Move = false;
+ t.UseDefaultSettings = true;
EditorGUILayout.Separator();
}
EditorGUILayout.PropertyField(waitUntilFinishedProp);
- if (t.portrait != null && t.display != DisplayType.Hide)
+ if (t._Portrait != null && t.Display != DisplayType.Hide)
{
- Texture2D characterTexture = t.portrait.texture;
+ Texture2D characterTexture = t._Portrait.texture;
float aspect = (float)characterTexture.width / (float)characterTexture.height;
Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true));
@@ -257,12 +246,12 @@ namespace Fungus
}
}
- if (t.display != DisplayType.Hide)
+ if (t.Display != DisplayType.Hide)
{
string portraitName = "";
- if (t.portrait != null)
+ if (t._Portrait != null)
{
- portraitName = t.portrait.name;
+ portraitName = t._Portrait.name;
}
string portraitSummary = " " + portraitName;
int toolbarInt = 1;
@@ -272,8 +261,8 @@ namespace Fungus
if (toolbarInt != 1)
{
- for(int i=0; i 0)
{
- t.portrait = t.character.portraits[--portraitIndex];
+ t._Portrait = t._Character.Portraits[--portraitIndex];
}
else
{
- t.portrait = null;
+ t._Portrait = null;
}
}
if (toolbarInt == 2)
{
- if(portraitIndex < t.character.portraits.Count-1)
+ if(portraitIndex < t._Character.Portraits.Count-1)
{
- t.portrait = t.character.portraits[++portraitIndex];
+ t._Portrait = t._Character.Portraits[++portraitIndex];
}
}
}
diff --git a/Assets/Fungus/Narrative/Editor/SayEditor.cs b/Assets/Fungus/Narrative/Editor/SayEditor.cs
index b60b2de9..4855cac5 100644
--- a/Assets/Fungus/Narrative/Editor/SayEditor.cs
+++ b/Assets/Fungus/Narrative/Editor/SayEditor.cs
@@ -1,18 +1,12 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
-using UnityEditorInternal;
using UnityEngine;
-using System.Collections;
using System.Collections.Generic;
-using Rotorz.ReorderableList;
namespace Fungus
{
-
[CustomEditor (typeof(Say))]
public class SayEditor : CommandEditor
{
@@ -50,8 +44,8 @@ namespace Fungus
if (parentTag != null)
{
tagName = parentTag.name;
- tagStartSymbol = parentTag.tagStartSymbol;
- tagEndSymbol = parentTag.tagEndSymbol;
+ tagStartSymbol = parentTag.TagStartSymbol;
+ tagEndSymbol = parentTag.TagEndSymbol;
}
tagsText += "\n\n\t" + tagStartSymbol + " " + tagName + " " + tagEndSymbol;
foreach(Transform child in parent)
@@ -63,8 +57,8 @@ namespace Fungus
if (childTag != null)
{
tagName = childTag.name;
- tagStartSymbol = childTag.tagStartSymbol;
- tagEndSymbol = childTag.tagEndSymbol;
+ tagStartSymbol = childTag.TagStartSymbol;
+ tagEndSymbol = childTag.TagEndSymbol;
}
tagsText += "\n\t " + tagStartSymbol + " " + tagName + " " + tagEndSymbol;
}
@@ -135,9 +129,9 @@ namespace Fungus
Say t = target as Say;
// Only show portrait selection if...
- if (t.character != null && // Character is selected
- t.character.portraits != null && // Character has a portraits field
- t.character.portraits.Count > 0 ) // Selected Character has at least 1 portrait
+ if (t._Character != null && // Character is selected
+ t._Character.Portraits != null && // Character has a portraits field
+ t._Character.Portraits.Count > 0 ) // Selected Character has at least 1 portrait
{
showPortraits = true;
}
@@ -145,15 +139,15 @@ namespace Fungus
if (showPortraits)
{
CommandEditor.ObjectField(portraitProp,
- new GUIContent("Portrait", "Portrait representing speaking character"),
- new GUIContent(""),
- t.character.portraits);
+ new GUIContent("Portrait", "Portrait representing speaking character"),
+ new GUIContent(""),
+ t._Character.Portraits);
}
else
{
- if (!t.extendPrevious)
+ if (!t.ExtendPrevious)
{
- t.portrait = null;
+ t.Portrait = null;
}
}
@@ -204,9 +198,9 @@ namespace Fungus
EditorGUILayout.PropertyField(stopVoiceoverProp);
EditorGUILayout.PropertyField(setSayDialogProp);
- if (showPortraits && t.portrait != null)
+ if (showPortraits && t.Portrait != null)
{
- Texture2D characterTexture = t.portrait.texture;
+ Texture2D characterTexture = t.Portrait.texture;
float aspect = (float)characterTexture.width / (float)characterTexture.height;
Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true));
if (characterTexture != null)
@@ -217,6 +211,5 @@ namespace Fungus
serializedObject.ApplyModifiedProperties();
}
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/Narrative/Editor/StageEditor.cs b/Assets/Fungus/Narrative/Editor/StageEditor.cs
index 54e17893..fed194ac 100644
--- a/Assets/Fungus/Narrative/Editor/StageEditor.cs
+++ b/Assets/Fungus/Narrative/Editor/StageEditor.cs
@@ -1,22 +1,11 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
-using UnityEditorInternal;
using UnityEngine;
-using UnityEngine.UI;
-using UnityEngine.Events;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using Rotorz.ReorderableList;
-
namespace Fungus
{
-
[CustomEditor (typeof(ControlStage))]
public class StageEditor : CommandEditor
{
@@ -47,11 +36,11 @@ namespace Fungus
ControlStage t = target as ControlStage;
// Format Enum names
- string[] displayLabels = StringFormatter.FormatEnumNames(t.display,"");
+ string[] displayLabels = StringFormatter.FormatEnumNames(t.Display,"");
displayProp.enumValueIndex = EditorGUILayout.Popup("Display", (int)displayProp.enumValueIndex, displayLabels);
string replaceLabel = "Portrait Stage";
- if (t.display == StageDisplayType.Swap)
+ if (t.Display == StageDisplayType.Swap)
{
CommandEditor.ObjectField(replacedStageProp,
new GUIContent("Replace", "Character to swap with"),
@@ -69,11 +58,11 @@ namespace Fungus
}
bool showOptionalFields = true;
- Stage s = t.stage;
+ Stage s = t._Stage;
// Only show optional portrait fields once required fields have been filled...
- if (t.stage != null) // Character is selected
+ if (t._Stage != null) // Character is selected
{
- if (t.stage == null) // If no default specified, try to get any portrait stage in the scene
+ if (t._Stage == null) // If no default specified, try to get any portrait stage in the scene
{
s = GameObject.FindObjectOfType();
}
@@ -83,10 +72,10 @@ namespace Fungus
showOptionalFields = false;
}
}
- if (t.display != StageDisplayType.None && showOptionalFields)
+ if (t.Display != StageDisplayType.None && showOptionalFields)
{
EditorGUILayout.PropertyField(useDefaultSettingsProp);
- if (!t.useDefaultSettings)
+ if (!t.UseDefaultSettings)
{
EditorGUILayout.PropertyField(fadeDurationProp);
}
diff --git a/Assets/Fungus/Narrative/Scripts/Character.cs b/Assets/Fungus/Narrative/Scripts/Character.cs
index e58fb620..03a1fa5e 100644
--- a/Assets/Fungus/Narrative/Scripts/Character.cs
+++ b/Assets/Fungus/Narrative/Scripts/Character.cs
@@ -1,34 +1,48 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System.Collections;
using System.Collections.Generic;
using System;
namespace Fungus
{
+ ///
+ /// A Character that can be used in dialogue via the Say, Conversation and Portrait commands.
+ ///
[ExecuteInEditMode]
public class Character : MonoBehaviour, ILocalizable
{
- public string nameText; // We need a separate name as the object name is used for character variations (e.g. "Smurf Happy", "Smurf Sad")
- public Color nameColor = Color.white;
- public AudioClip soundEffect;
- public Sprite profileSprite;
- public List portraits;
- public FacingDirection portraitsFace;
- public PortraitState state = new PortraitState();
+ [SerializeField] protected string nameText; // We need a separate name as the object name is used for character variations (e.g. "Smurf Happy", "Smurf Sad")
+ public string NameText { get { return nameText; } }
+
+ [SerializeField] protected Color nameColor = Color.white;
+ public Color NameColor { get { return nameColor; } }
+
+ [SerializeField] protected AudioClip soundEffect;
+ public AudioClip SoundEffect { get { return soundEffect; } }
+
+ [SerializeField] protected Sprite profileSprite;
+ public Sprite ProfileSprite { get { return profileSprite; } set { profileSprite = value; } }
+
+ [SerializeField] protected List portraits;
+ public List Portraits { get { return portraits; } }
+
+ [SerializeField] protected FacingDirection portraitsFace;
+ public FacingDirection PortraitsFace { get { return portraitsFace; } }
+
+ [SerializeField] protected PortraitState state = new PortraitState();
+ public PortraitState State { get { return state; } }
[Tooltip("Sets the active Say dialog with a reference to a Say Dialog object in the scene. All story text will now display using this Say Dialog.")]
- public SayDialog setSayDialog;
+ [SerializeField] protected SayDialog setSayDialog;
+ public SayDialog SetSayDialog { get { return setSayDialog; } }
[FormerlySerializedAs("notes")]
[TextArea(5,10)]
- public string description;
+ [SerializeField] protected string description;
static public List activeCharacters = new List();
@@ -45,9 +59,7 @@ namespace Fungus
activeCharacters.Remove(this);
}
- //
- // ILocalizable implementation
- //
+ #region ILocalizable implementation
public virtual string GetStandardText()
{
@@ -98,6 +110,7 @@ namespace Fungus
// String id for character names is CHARACTER.
return "CHARACTER." + nameText;
}
- }
+ #endregion
+ }
}
diff --git a/Assets/Fungus/Narrative/Scripts/Commands/ClearMenu.cs b/Assets/Fungus/Narrative/Scripts/Commands/ClearMenu.cs
index f9d0403b..23f379f6 100644
--- a/Assets/Fungus/Narrative/Scripts/Commands/ClearMenu.cs
+++ b/Assets/Fungus/Narrative/Scripts/Commands/ClearMenu.cs
@@ -1,21 +1,20 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
-
+ ///
+ /// Clears the options from a menu dialogue.
+ ///
[CommandInfo("Narrative",
"Clear Menu",
"Clears the options from a menu dialogue")]
public class ClearMenu : Command
{
[Tooltip("Menu Dialog to clear the options on")]
- public MenuDialog menuDialog;
+ [SerializeField] protected MenuDialog menuDialog;
public override void OnEnter()
{
@@ -39,5 +38,4 @@ namespace Fungus
return new Color32(184, 210, 235, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Narrative/Scripts/Commands/ControlStage.cs b/Assets/Fungus/Narrative/Scripts/Commands/ControlStage.cs
index 101efcbb..f3fabc73 100644
--- a/Assets/Fungus/Narrative/Scripts/Commands/ControlStage.cs
+++ b/Assets/Fungus/Narrative/Scripts/Commands/ControlStage.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.UI;
@@ -23,25 +21,30 @@ namespace Fungus
DimNonSpeakingPortraits
}
+ ///
+ /// Controls the stage on which character portraits are displayed.
+ ///
[CommandInfo("Narrative",
"Control Stage",
"Controls the stage on which character portraits are displayed.")]
public class ControlStage : ControlWithDisplay
{
[Tooltip("Stage to display characters on")]
- public Stage stage;
+ [SerializeField] protected Stage stage;
+ public Stage _Stage { get { return stage; } }
[Tooltip("Stage to swap with")]
- public Stage replacedStage;
+ [SerializeField] protected Stage replacedStage;
[Tooltip("Use Default Settings")]
- public bool useDefaultSettings = true;
+ [SerializeField] protected bool useDefaultSettings = true;
+ public bool UseDefaultSettings { get { return useDefaultSettings; } }
[Tooltip("Fade Duration")]
- public float fadeDuration;
+ [SerializeField] protected float fadeDuration;
[Tooltip("Wait until the tween has finished before executing the next command")]
- public bool waitUntilFinished = false;
+ [SerializeField] protected bool waitUntilFinished = false;
public override void OnEnter()
{
@@ -83,7 +86,7 @@ namespace Fungus
// Use default settings
if (useDefaultSettings)
{
- fadeDuration = stage.fadeDuration;
+ fadeDuration = stage.FadeDuration;
}
switch(display)
{
@@ -139,19 +142,19 @@ namespace Fungus
{
if (s == stage)
{
- s.portraitCanvas.sortingOrder = 1;
+ s.PortraitCanvas.sortingOrder = 1;
}
else
{
- s.portraitCanvas.sortingOrder = 0;
+ s.PortraitCanvas.sortingOrder = 0;
}
}
}
protected void UndimAllPortraits(Stage stage)
{
- stage.dimPortraits = false;
- foreach (Character character in stage.charactersOnStage)
+ stage.DimPortraits = false;
+ foreach (Character character in stage.CharactersOnStage)
{
stage.SetDimmed(character, false);
}
@@ -159,7 +162,7 @@ namespace Fungus
protected void DimNonSpeakingPortraits(Stage stage)
{
- stage.dimPortraits = true;
+ stage.DimPortraits = true;
}
protected void OnComplete()
diff --git a/Assets/Fungus/Narrative/Scripts/Commands/ControlWithDisplay.cs b/Assets/Fungus/Narrative/Scripts/Commands/ControlWithDisplay.cs
index 42bad038..c0d3ed47 100644
--- a/Assets/Fungus/Narrative/Scripts/Commands/ControlWithDisplay.cs
+++ b/Assets/Fungus/Narrative/Scripts/Commands/ControlWithDisplay.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using System;
using UnityEngine;
@@ -11,7 +9,9 @@ namespace Fungus
public class ControlWithDisplay : Command
{
[Tooltip("Display type")]
- public TDisplayEnum display;
+ [SerializeField] protected TDisplayEnum display;
+
+ public TDisplayEnum Display { get { return display; } }
protected bool IsDisplayNone(TEnum enumValue)
{
diff --git a/Assets/Fungus/Narrative/Scripts/Commands/Conversation.cs b/Assets/Fungus/Narrative/Scripts/Commands/Conversation.cs
index fd2d7736..49a565a0 100644
--- a/Assets/Fungus/Narrative/Scripts/Commands/Conversation.cs
+++ b/Assets/Fungus/Narrative/Scripts/Commands/Conversation.cs
@@ -1,14 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using UnityEngine.Serialization;
using System.Collections;
namespace Fungus
{
+ ///
+ /// Do multiple say and portrait commands in a single block of text. Format is: [character] [portrait] [stage position] [: Story text].
+ ///
[CommandInfo("Narrative",
"Conversation",
"Do multiple say and portrait commands in a single block of text. Format is: [character] [portrait] [stage position] [: Story text]")]
@@ -16,9 +16,9 @@ namespace Fungus
[ExecuteInEditMode]
public class Conversation : Command
{
- public StringDataMulti conversationText;
+ [SerializeField] protected StringDataMulti conversationText;
- public ConversationManager conversationManager = new ConversationManager();
+ protected ConversationManager conversationManager = new ConversationManager();
protected virtual void Start()
{
diff --git a/Assets/Fungus/Narrative/Scripts/Commands/Menu.cs b/Assets/Fungus/Narrative/Scripts/Commands/Menu.cs
index 9f03b1cf..c26d1bd2 100644
--- a/Assets/Fungus/Narrative/Scripts/Commands/Menu.cs
+++ b/Assets/Fungus/Narrative/Scripts/Commands/Menu.cs
@@ -1,16 +1,15 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System;
-using System.Collections;
using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Displays a button in a multiple choice menu.
+ ///
[CommandInfo("Narrative",
"Menu",
"Displays a button in a multiple choice menu")]
@@ -18,23 +17,23 @@ namespace Fungus
public class Menu : Command, ILocalizable
{
[Tooltip("Text to display on the menu button")]
- public string text = "Option Text";
+ [SerializeField] protected string text = "Option Text";
[Tooltip("Notes about the option text for other authors, localization, etc.")]
- public string description = "";
+ [SerializeField] protected string description = "";
[FormerlySerializedAs("targetSequence")]
[Tooltip("Block to execute when this option is selected")]
- public Block targetBlock;
+ [SerializeField] protected Block targetBlock;
[Tooltip("Hide this option if the target block has been executed previously")]
- public bool hideIfVisited;
+ [SerializeField] protected bool hideIfVisited;
[Tooltip("If false, the menu option will be displayed but will not be selectable")]
- public BooleanData interactable = new BooleanData(true);
+ [SerializeField] protected BooleanData interactable = new BooleanData(true);
[Tooltip("A custom Menu Dialog to use to display this menu. All subsequent Menu commands will use this dialog.")]
- public MenuDialog setMenuDialog;
+ [SerializeField] protected MenuDialog setMenuDialog;
public override void OnEnter()
{
@@ -83,7 +82,7 @@ namespace Fungus
return "Error: No button text selected";
}
- return text + " : " + targetBlock.blockName;
+ return text + " : " + targetBlock.BlockName;
}
public override Color GetButtonColor()
@@ -91,10 +90,8 @@ namespace Fungus
return new Color32(184, 210, 235, 255);
}
- //
- // ILocalizable implementation
- //
-
+ #region ILocalizable implementation
+
public virtual string GetStandardText()
{
return text;
@@ -115,6 +112,7 @@ namespace Fungus
// String id for Menu commands is MENU..
return "MENU." + GetFlowchartLocalizationId() + "." + itemId;
}
- }
+ #endregion
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/Narrative/Scripts/Commands/MenuTimer.cs b/Assets/Fungus/Narrative/Scripts/Commands/MenuTimer.cs
index 2933abd1..3d2ddce5 100644
--- a/Assets/Fungus/Narrative/Scripts/Commands/MenuTimer.cs
+++ b/Assets/Fungus/Narrative/Scripts/Commands/MenuTimer.cs
@@ -1,17 +1,15 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using UnityEngine.EventSystems;
-using System;
-using System.Collections;
using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Displays a timer bar and executes a target block if the player fails to select a menu option in time.
+ ///
[CommandInfo("Narrative",
"Menu Timer",
"Displays a timer bar and executes a target block if the player fails to select a menu option in time.")]
@@ -20,11 +18,11 @@ namespace Fungus
public class MenuTimer : Command
{
[Tooltip("Length of time to display the timer for")]
- public FloatData _duration = new FloatData(1);
+ [SerializeField] protected FloatData _duration = new FloatData(1);
[FormerlySerializedAs("targetSequence")]
[Tooltip("Block to execute when the timer expires")]
- public Block targetBlock;
+ [SerializeField] protected Block targetBlock;
public override void OnEnter()
{
@@ -54,7 +52,7 @@ namespace Fungus
return "Error: No target block selected";
}
- return targetBlock.blockName;
+ return targetBlock.BlockName;
}
public override Color GetButtonColor()
@@ -77,5 +75,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Narrative/Scripts/Commands/Portrait.cs b/Assets/Fungus/Narrative/Scripts/Commands/Portrait.cs
index be796e02..27e3fba4 100644
--- a/Assets/Fungus/Narrative/Scripts/Commands/Portrait.cs
+++ b/Assets/Fungus/Narrative/Scripts/Commands/Portrait.cs
@@ -1,67 +1,72 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using UnityEngine.UI;
-using UnityEngine.Events;
-using System;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
-
+ ///
+ /// Controls a character portrait.
+ ///
[CommandInfo("Narrative",
"Portrait",
- "Controls a character portrait. ")]
+ "Controls a character portrait.")]
public class Portrait : ControlWithDisplay
{
[Tooltip("Stage to display portrait on")]
- public Stage stage;
-
+ [SerializeField] protected Stage stage;
+ public Stage _Stage { get { return stage; } set { stage = value; } }
+
[Tooltip("Character to display")]
- public Character character;
-
+ [SerializeField] protected Character character;
+ public Character _Character { get { return character; } set { character = value; } }
+
[Tooltip("Character to swap with")]
- public Character replacedCharacter;
+ [SerializeField] protected Character replacedCharacter;
[Tooltip("Portrait to display")]
- public Sprite portrait;
-
+ [SerializeField] protected Sprite portrait;
+ public Sprite _Portrait { get { return portrait; } set { portrait = value; } }
+
[Tooltip("Move the portrait from/to this offset position")]
- public PositionOffset offset;
-
+ [SerializeField] protected PositionOffset offset;
+ public PositionOffset Offset { get { return offset; } set { offset = value; } }
+
[Tooltip("Move the portrait from this position")]
- public RectTransform fromPosition;
+ [SerializeField] protected RectTransform fromPosition;
+ public RectTransform FromPosition { get { return fromPosition; } set { fromPosition = value;} }
[Tooltip("Move the portrait to this positoin")]
- public RectTransform toPosition;
+ [SerializeField] protected RectTransform toPosition;
+ public RectTransform ToPosition { get { return toPosition; } set { toPosition = value;} }
[Tooltip("Direction character is facing")]
- public FacingDirection facing;
-
+ [SerializeField] protected FacingDirection facing;
+ public FacingDirection Facing { get { return facing; } set { facing = value; } }
+
[Tooltip("Use Default Settings")]
- public bool useDefaultSettings = true;
-
+ [SerializeField] protected bool useDefaultSettings = true;
+ public bool UseDefaultSettings { get { return useDefaultSettings; } set { useDefaultSettings = value; } }
+
[Tooltip("Fade Duration")]
- public float fadeDuration = 0.5f;
+ [SerializeField] protected float fadeDuration = 0.5f;
[Tooltip("Movement Duration")]
- public float moveDuration = 1f;
+ [SerializeField] protected float moveDuration = 1f;
[Tooltip("Shift Offset")]
- public Vector2 shiftOffset;
+ [SerializeField] protected Vector2 shiftOffset;
[Tooltip("Move")]
- public bool move;
-
+ [SerializeField] protected bool move;
+ public bool Move { get { return move; } set { move = value; } }
+
[Tooltip("Start from offset")]
- public bool shiftIntoPlace;
-
+ [SerializeField] protected bool shiftIntoPlace;
+ public bool ShiftIntoPlace { get { return shiftIntoPlace; } set { shiftIntoPlace = value; } }
+
[Tooltip("Wait until the tween has finished before executing the next command")]
- public bool waitUntilFinished = false;
+ [SerializeField] protected bool waitUntilFinished = false;
public override void OnEnter()
{
diff --git a/Assets/Fungus/Narrative/Scripts/Commands/Say.cs b/Assets/Fungus/Narrative/Scripts/Commands/Say.cs
index 28812f7a..af16d0da 100644
--- a/Assets/Fungus/Narrative/Scripts/Commands/Say.cs
+++ b/Assets/Fungus/Narrative/Scripts/Commands/Say.cs
@@ -1,15 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Writes text in a dialog box.
+ ///
[CommandInfo("Narrative",
"Say",
"Writes text in a dialog box.")]
@@ -18,40 +16,43 @@ namespace Fungus
{
// Removed this tooltip as users's reported it obscures the text box
[TextArea(5,10)]
- public string storyText = "";
+ [SerializeField] protected string storyText = "";
[Tooltip("Notes about this story text for other authors, localization, etc.")]
- public string description = "";
+ [SerializeField] protected string description = "";
[Tooltip("Character that is speaking")]
- public Character character;
+ [SerializeField] protected Character character;
+ public Character _Character { get { return character; } }
[Tooltip("Portrait that represents speaking character")]
- public Sprite portrait;
+ [SerializeField] protected Sprite portrait;
+ public Sprite Portrait { get { return portrait; } set { portrait = value; } }
[Tooltip("Voiceover audio to play when writing the text")]
- public AudioClip voiceOverClip;
+ [SerializeField] protected AudioClip voiceOverClip;
[Tooltip("Always show this Say text when the command is executed multiple times")]
- public bool showAlways = true;
+ [SerializeField] protected bool showAlways = true;
[Tooltip("Number of times to show this Say text when the command is executed multiple times")]
- public int showCount = 1;
+ [SerializeField] protected int showCount = 1;
[Tooltip("Type this text in the previous dialog box.")]
- public bool extendPrevious = false;
+ [SerializeField] protected bool extendPrevious = false;
+ public bool ExtendPrevious { get { return extendPrevious; } }
[Tooltip("Fade out the dialog box when writing has finished and not waiting for input.")]
- public bool fadeWhenDone = true;
+ [SerializeField] protected bool fadeWhenDone = true;
[Tooltip("Wait for player to click before continuing.")]
- public bool waitForClick = true;
+ [SerializeField] protected bool waitForClick = true;
[Tooltip("Stop playing voiceover when text finishes writing.")]
- public bool stopVoiceover = true;
+ [SerializeField] protected bool stopVoiceover = true;
[Tooltip("Sets the active Say dialog with a reference to a Say Dialog object in the scene. All story text will now display using this Say Dialog.")]
- public SayDialog setSayDialog;
+ [SerializeField] protected SayDialog setSayDialog;
protected int executionCount;
@@ -66,9 +67,9 @@ namespace Fungus
executionCount++;
// Override the active say dialog if needed
- if (character != null && character.setSayDialog != null)
+ if (character != null && character.SetSayDialog != null)
{
- SayDialog.activeSayDialog = character.setSayDialog;
+ SayDialog.activeSayDialog = character.SetSayDialog;
}
if (setSayDialog != null)
@@ -95,10 +96,10 @@ namespace Fungus
foreach (CustomTag ct in CustomTag.activeCustomTags)
{
- displayText = displayText.Replace(ct.tagStartSymbol, ct.replaceTagStartWith);
- if (ct.tagEndSymbol != "" && ct.replaceTagEndWith != "")
+ displayText = displayText.Replace(ct.TagStartSymbol, ct.ReplaceTagStartWith);
+ if (ct.TagEndSymbol != "" && ct.ReplaceTagEndWith != "")
{
- displayText = displayText.Replace(ct.tagEndSymbol, ct.replaceTagEndWith);
+ displayText = displayText.Replace(ct.TagEndSymbol, ct.ReplaceTagEndWith);
}
}
@@ -114,7 +115,7 @@ namespace Fungus
string namePrefix = "";
if (character != null)
{
- namePrefix = character.nameText + ": ";
+ namePrefix = character.NameText + ": ";
}
if (extendPrevious)
{
@@ -144,10 +145,8 @@ namespace Fungus
sayDialog.Stop();
}
- //
- // ILocalizable implementation
- //
-
+ #region ILocalizable implementation
+
public virtual string GetStandardText()
{
return storyText;
@@ -169,11 +168,12 @@ namespace Fungus
string stringId = "SAY." + GetFlowchartLocalizationId() + "." + itemId + ".";
if (character != null)
{
- stringId += character.nameText;
+ stringId += character.NameText;
}
return stringId;
}
- }
+ #endregion
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs b/Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs
index 86ee01ac..a3c42f29 100644
--- a/Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs
+++ b/Assets/Fungus/Narrative/Scripts/Commands/SetLanguage.cs
@@ -1,14 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Set the active language for the scene. A Localization object with a localization file must be present in the scene.
+ ///
[CommandInfo("Narrative",
"Set Language",
"Set the active language for the scene. A Localization object with a localization file must be present in the scene.")]
@@ -17,7 +17,7 @@ namespace Fungus
public class SetLanguage : Command
{
[Tooltip("Code of the language to set. e.g. ES, DE, JA")]
- public StringData _languageCode = new StringData();
+ [SerializeField] protected StringData _languageCode = new StringData();
public static string mostRecentLanguage = "";
diff --git a/Assets/Fungus/Narrative/Scripts/Commands/SetMenuDialog.cs b/Assets/Fungus/Narrative/Scripts/Commands/SetMenuDialog.cs
index a335e592..884dccf0 100644
--- a/Assets/Fungus/Narrative/Scripts/Commands/SetMenuDialog.cs
+++ b/Assets/Fungus/Narrative/Scripts/Commands/SetMenuDialog.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Sets a custom menu dialog to use when displaying multiple choice menus.
+ ///
[CommandInfo("Narrative",
"Set Menu Dialog",
"Sets a custom menu dialog to use when displaying multiple choice menus")]
@@ -16,7 +15,7 @@ namespace Fungus
public class SetMenuDialog : Command
{
[Tooltip("The Menu Dialog to use for displaying menu buttons")]
- public MenuDialog menuDialog;
+ [SerializeField] protected MenuDialog menuDialog;
public override void OnEnter()
{
@@ -43,5 +42,4 @@ namespace Fungus
return new Color32(184, 210, 235, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Narrative/Scripts/Commands/SetSayDialog.cs b/Assets/Fungus/Narrative/Scripts/Commands/SetSayDialog.cs
index 1aaec267..e507e7be 100644
--- a/Assets/Fungus/Narrative/Scripts/Commands/SetSayDialog.cs
+++ b/Assets/Fungus/Narrative/Scripts/Commands/SetSayDialog.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Sets a custom say dialog to use when displaying story text.
+ ///
[CommandInfo("Narrative",
"Set Say Dialog",
"Sets a custom say dialog to use when displaying story text")]
@@ -16,7 +15,7 @@ namespace Fungus
public class SetSayDialog : Command
{
[Tooltip("The Say Dialog to use for displaying Say story text")]
- public SayDialog sayDialog;
+ [SerializeField] protected SayDialog sayDialog;
public override void OnEnter()
{
@@ -43,5 +42,4 @@ namespace Fungus
return new Color32(184, 210, 235, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Narrative/Scripts/ConversationManager.cs b/Assets/Fungus/Narrative/Scripts/ConversationManager.cs
index cfaccdfe..14610e15 100644
--- a/Assets/Fungus/Narrative/Scripts/ConversationManager.cs
+++ b/Assets/Fungus/Narrative/Scripts/ConversationManager.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections;
+using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using UnityEngine;
@@ -7,6 +6,9 @@ using System.Text;
namespace Fungus
{
+ ///
+ /// Helper class to manage parsing and executing the conversation format.
+ ///
public class ConversationManager
{
protected struct ConversationItem
@@ -35,9 +37,9 @@ namespace Fungus
SayDialog sayDialog = null;
if (character != null)
{
- if (character.setSayDialog != null)
+ if (character.SetSayDialog != null)
{
- sayDialog = character.setSayDialog;
+ sayDialog = character.SetSayDialog;
}
}
@@ -105,14 +107,13 @@ namespace Fungus
var stage = Stage.GetActiveStage();
if (stage != null && currentCharacter != null &&
- (currentPortrait != currentCharacter.state.portrait ||
- currentPosition != currentCharacter.state.position ||
- item.Flip))
+ (currentPortrait != currentCharacter.State.portrait ||
+ currentPosition != currentCharacter.State.position))
{
var portraitOptions = new PortraitOptions(true);
portraitOptions.display = item.Hide ? DisplayType.Hide : DisplayType.Show;
portraitOptions.character = currentCharacter;
- portraitOptions.fromPosition = currentCharacter.state.position;
+ portraitOptions.fromPosition = currentCharacter.State.position;
portraitOptions.toPosition = currentPosition;
portraitOptions.portrait = currentPortrait;
@@ -120,8 +121,8 @@ namespace Fungus
if (item.Flip) portraitOptions.facing = item.FacingDirection;
// Do a move tween if the character is already on screen and not yet at the specified position
- if (currentCharacter.state.onScreen &&
- currentPosition != currentCharacter.state.position)
+ if (currentCharacter.State.onScreen &&
+ currentPosition != currentCharacter.State.position)
{
portraitOptions.move = true;
}
@@ -372,4 +373,4 @@ namespace Fungus
return results.ToArray();
}
}
-}
\ No newline at end of file
+}
diff --git a/Assets/Fungus/Narrative/Scripts/CustomTag.cs b/Assets/Fungus/Narrative/Scripts/CustomTag.cs
index 617deb06..c55f00c0 100644
--- a/Assets/Fungus/Narrative/Scripts/CustomTag.cs
+++ b/Assets/Fungus/Narrative/Scripts/CustomTag.cs
@@ -1,24 +1,29 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using UnityEngine.UI;
-using UnityEngine.Events;
-using System.Collections;
using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Create custom tags for use in Say text.
+ ///
[ExecuteInEditMode]
public class CustomTag : MonoBehaviour
{
- public string tagStartSymbol;
- public string tagEndSymbol;
- public string replaceTagStartWith;
- public string replaceTagEndWith;
-
+ [SerializeField] protected string tagStartSymbol;
+ public string TagStartSymbol { get { return tagStartSymbol; } }
+
+ [SerializeField] protected string tagEndSymbol;
+ public string TagEndSymbol { get { return tagEndSymbol; } }
+
+ [SerializeField] protected string replaceTagStartWith;
+ public string ReplaceTagStartWith { get { return replaceTagStartWith; } }
+
+ [SerializeField] protected string replaceTagEndWith;
+ public string ReplaceTagEndWith { get { return replaceTagEndWith; } }
+
static public List activeCustomTags = new List();
protected virtual void OnEnable()
@@ -34,5 +39,4 @@ namespace Fungus
activeCustomTags.Remove(this);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Narrative/Scripts/DialogInput.cs b/Assets/Fungus/Narrative/Scripts/DialogInput.cs
index da2416d5..265cb441 100644
--- a/Assets/Fungus/Narrative/Scripts/DialogInput.cs
+++ b/Assets/Fungus/Narrative/Scripts/DialogInput.cs
@@ -1,19 +1,22 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.EventSystems;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Interface for listening for dialogue input events.
+ ///
public interface IDialogInputListener
{
void OnNextLineEvent();
}
-
+
+ ///
+ /// Input handler for say dialogues.
+ ///
public class DialogInput : MonoBehaviour
{
public enum ClickMode
@@ -25,16 +28,16 @@ namespace Fungus
}
[Tooltip("Click to advance story")]
- public ClickMode clickMode;
+ [SerializeField] protected ClickMode clickMode;
[Tooltip("Delay between consecutive clicks. Useful to prevent accidentally clicking through story.")]
- public float nextClickDelay = 0f;
+ [SerializeField] protected float nextClickDelay = 0f;
[Tooltip("Allow holding Cancel to fast forward text")]
- public bool cancelEnabled = true;
+ [SerializeField] protected bool cancelEnabled = true;
[Tooltip("Ignore input if a Menu dialog is currently active")]
- public bool ignoreMenuClicks = true;
+ [SerializeField] protected bool ignoreMenuClicks = true;
protected bool dialogClickedFlag;
@@ -44,17 +47,17 @@ namespace Fungus
protected StandaloneInputModule currentStandaloneInputModule;
- /**
- * Trigger next line input event from script.
- */
+ ///
+ /// Trigger next line input event from script.
+ ///
public void SetNextLineFlag()
{
nextLineInputFlag = true;
}
- /**
- * Set the dialog clicked flag (usually from an Event Trigger component in the dialog UI)
- */
+ ///
+ /// Set the dialog clicked flag (usually from an Event Trigger component in the dialog UI).
+ ///
public void SetDialogClickedFlag()
{
// Ignore repeat clicks for a short time to prevent accidentally clicking through the character dialogue
@@ -157,6 +160,4 @@ namespace Fungus
}
}
}
-
}
-
diff --git a/Assets/Fungus/Narrative/Scripts/Localization.cs b/Assets/Fungus/Narrative/Scripts/Localization.cs
index 72cf2930..fddc3f25 100644
--- a/Assets/Fungus/Narrative/Scripts/Localization.cs
+++ b/Assets/Fungus/Narrative/Scripts/Localization.cs
@@ -1,23 +1,17 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
-using System;
-using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Text;
-using System.IO;
using Ideafixxxer.CsvParser;
namespace Fungus
{
-
public interface ILocalizable
{
string GetStandardText();
@@ -26,24 +20,25 @@ namespace Fungus
string GetStringId();
}
- /**
- * Multi-language localization support.
- */
+ ///
+ /// Multi-language localization support.
+ ///
public class Localization : MonoBehaviour, StringSubstituter.ISubstitutionHandler
{
- /**
- * Language to use at startup, usually defined by a two letter language code (e.g DE = German)
- */
+ ///
+ /// Language to use at startup, usually defined by a two letter language code (e.g DE = German).
+ ///
[Tooltip("Language to use at startup, usually defined by a two letter language code (e.g DE = German)")]
- public string activeLanguage = "";
+ [SerializeField] protected string activeLanguage = "";
+ public string ActiveLanguage { get { return activeLanguage; } }
protected static Dictionary localizedStrings = new Dictionary();
protected Dictionary localizeableObjects = new Dictionary();
- /**
- * Temp storage for a single item of standard text and its localizations
- */
+ ///
+ /// Temp storage for a single item of standard text and its localizations.
+ ///
protected class TextItem
{
public string description = "";
@@ -51,17 +46,20 @@ namespace Fungus
public Dictionary localizedStrings = new Dictionary();
}
- /**
- * CSV file containing localization data which can be easily edited in a spreadsheet tool.
- */
- [Tooltip("CSV file containing localization data which can be easily edited in a spreadsheet tool")]
- public TextAsset localizationFile;
+ ///
+ /// CSV file containing localization data which can be easily edited in a spreadsheet tool.
+ ///
+ [Tooltip("CSV file containing localization data which can be easily edited in a spreadsheet tool")]
+ [SerializeField] protected TextAsset localizationFile;
+
+ public TextAsset LocalizationFile { get { return localizationFile; } set { localizationFile = value; } }
- /**
- * Stores any notification message from export / import methods.
- */
- [NonSerialized]
- public string notificationText = "";
+ ///
+ /// Stores any notification message from export / import methods.
+ ///
+ protected string notificationText = "";
+
+ public string NotificationText { get { return notificationText; } set { notificationText = value; } }
protected bool initialized;
@@ -94,10 +92,10 @@ namespace Fungus
Init();
}
- /**
- * String subsitution can happen during the Start of another component, so we
- * may need to call Init() from other methods.
- */
+ ///
+ /// String subsitution can happen during the Start of another component, so we
+ /// may need to call Init() from other methods.
+ ///
protected virtual void Init()
{
if (initialized)
@@ -135,11 +133,11 @@ namespace Fungus
}
}
- /**
- * Looks up the specified string in the localized strings table.
- * For this to work, a localization file and active language must have been set previously.
- * Return null if the string is not found.
- */
+ ///
+ /// Looks up the specified string in the localized strings table.
+ /// For this to work, a localization file and active language must have been set previously.
+ /// Return null if the string is not found.
+ ///
public static string GetLocalizedString(string stringId)
{
if (localizedStrings == null)
@@ -155,9 +153,9 @@ namespace Fungus
return null;
}
- /**
- * Convert all text items and localized strings to an easy to edit CSV format.
- */
+ ///
+ /// Convert all text items and localized strings to an easy to edit CSV format.
+ ///
public virtual string GetCSVData()
{
// Collect all the text items present in the scene
@@ -217,9 +215,9 @@ namespace Fungus
return csvData;
}
- /**
- * Builds a dictionary of localizable text items in the scene.
- */
+ ///
+ /// Builds a dictionary of localizable text items in the scene.
+ ///
protected Dictionary FindTextItems()
{
Dictionary textItems = new Dictionary();
@@ -232,7 +230,7 @@ namespace Fungus
Block[] blocks = flowchart.GetComponents();
foreach (Block block in blocks)
{
- foreach (Command command in block.commandList)
+ foreach (Command command in block.CommandList)
{
ILocalizable localizable = command as ILocalizable;
if (localizable != null)
@@ -270,9 +268,9 @@ namespace Fungus
return textItems;
}
- /**
- * Adds localized strings from CSV file data to a dictionary of text items in the scene.
- */
+ ///
+ /// Adds localized strings from CSV file data to a dictionary of text items in the scene.
+ ///
protected virtual void AddCSVDataItems(Dictionary textItems, string csvData)
{
CsvParser csvParser = new CsvParser();
@@ -337,10 +335,10 @@ namespace Fungus
}
}
- /**
- * Scan a localization CSV file and copies the strings for the specified language code
- * into the text properties of the appropriate scene objects.
- */
+ ///
+ /// Scan a localization CSV file and copies the strings for the specified language code
+ /// into the text properties of the appropriate scene objects.
+ ///
public virtual void SetActiveLanguage(string languageCode, bool forceUpdateSceneText = false)
{
if (!Application.isPlaying)
@@ -433,9 +431,9 @@ namespace Fungus
}
}
- /**
- * Populates the text property of a single scene object with a new text value.
- */
+ ///
+ /// Populates the text property of a single scene object with a new text value.
+ ///
public virtual bool PopulateTextProperty(string stringId, string newText)
{
// Ensure that all localizeable objects have been cached
@@ -455,10 +453,10 @@ namespace Fungus
return false;
}
- /**
- * Returns all standard text for localizeable text in the scene using an
- * easy to edit custom text format.
- */
+ ///
+ /// Returns all standard text for localizeable text in the scene using an
+ /// easy to edit custom text format.
+ ///
public virtual string GetStandardText()
{
// Collect all the text items present in the scene
@@ -480,9 +478,9 @@ namespace Fungus
return textData;
}
- /**
- * Sets standard text on scene objects by parsing a text data file.
- */
+ ///
+ /// Sets standard text on scene objects by parsing a text data file.
+ ///
public virtual void SetStandardText(string textData)
{
string[] lines = textData.Split('\n');
@@ -527,10 +525,10 @@ namespace Fungus
notificationText = "Updated " + updatedCount + " standard text items.";
}
- /**
- * Implementation of StringSubstituter.ISubstitutionHandler.
- * Relaces tokens of the form {$KeyName} with the localized value corresponding to that key.
- */
+ ///
+ /// Implementation of StringSubstituter.ISubstitutionHandler.
+ /// Replaces tokens of the form {$KeyName} with the localized value corresponding to that key.
+ ///
public virtual bool SubstituteStrings(StringBuilder input)
{
// This method could be called from the Start method of another component, so we
@@ -560,5 +558,4 @@ namespace Fungus
return modified;
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Narrative/Scripts/MenuDialog.cs b/Assets/Fungus/Narrative/Scripts/MenuDialog.cs
index 2f778406..5592a64a 100644
--- a/Assets/Fungus/Narrative/Scripts/MenuDialog.cs
+++ b/Assets/Fungus/Narrative/Scripts/MenuDialog.cs
@@ -1,33 +1,30 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.UI;
-using UnityEngine.Events;
-using System;
using System.Collections;
-using System.Collections.Generic;
using UnityEngine.EventSystems;
using System.Linq;
namespace Fungus
{
-
+ ///
+ /// Presents multiple choice buttons to the players.
+ ///
public class MenuDialog : MonoBehaviour
{
// Currently active Menu Dialog used to display Menu options
public static MenuDialog activeMenuDialog;
[Tooltip("Automatically select the first interactable button when the menu is shown.")]
- public bool autoSelectFirstButton = false;
+ [SerializeField] protected bool autoSelectFirstButton = false;
- [NonSerialized]
- public Button[] cachedButtons;
+ protected Button[] cachedButtons;
+ public Button[] CachedButtons { get { return cachedButtons; } }
- [NonSerialized]
- public Slider cachedSlider;
+ protected Slider cachedSlider;
+ public Slider CachedSlider { get { return cachedSlider; } }
public static MenuDialog GetMenuDialog()
{
@@ -142,7 +139,7 @@ namespace Fungus
#if UNITY_EDITOR
// Select the new target block in the Flowchart window
Flowchart flowchart = block.GetFlowchart();
- flowchart.selectedBlock = block;
+ flowchart.SelectedBlock = block;
#endif
gameObject.SetActive(false);
@@ -223,6 +220,5 @@ namespace Fungus
targetBlock.StartExecution();
}
}
- }
-
+ }
}
diff --git a/Assets/Fungus/Narrative/Scripts/PortraitController.cs b/Assets/Fungus/Narrative/Scripts/PortraitController.cs
index b5b6387e..ae79f5ca 100644
--- a/Assets/Fungus/Narrative/Scripts/PortraitController.cs
+++ b/Assets/Fungus/Narrative/Scripts/PortraitController.cs
@@ -1,14 +1,10 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using UnityEngine.Events;
using UnityEngine.UI;
using System;
using System.Collections;
-using System.Collections.Generic;
using MoonSharp.Interpreter;
namespace Fungus
@@ -57,11 +53,6 @@ namespace Fungus
moveDuration = 1f;
this.useDefaultSettings = useDefaultSettings;
}
-
- public override string ToString()
- {
- return base.ToString();
- }
}
public class PortraitState
@@ -139,7 +130,7 @@ namespace Fungus
// Early out if hiding a character that's already hidden
if (options.display == DisplayType.Hide &&
- !options.character.state.onScreen)
+ !options.character.State.onScreen)
{
onComplete();
return;
@@ -160,7 +151,7 @@ namespace Fungus
case (DisplayType.Replace):
Show(options);
- Hide(options.replacedCharacter, options.replacedCharacter.state.position.name);
+ Hide(options.replacedCharacter, options.replacedCharacter.State.position.name);
break;
case (DisplayType.MoveToFront):
@@ -170,7 +161,7 @@ namespace Fungus
}
- private void FinishCommand(PortraitOptions options)
+ protected void FinishCommand(PortraitOptions options)
{
if (options.onComplete != null)
{
@@ -194,59 +185,59 @@ namespace Fungus
///
///
///
- private PortraitOptions CleanPortraitOptions(PortraitOptions options)
+ protected PortraitOptions CleanPortraitOptions(PortraitOptions options)
{
// Use default stage settings
if (options.useDefaultSettings)
{
- options.fadeDuration = stage.fadeDuration;
- options.moveDuration = stage.moveDuration;
- options.shiftOffset = stage.shiftOffset;
+ options.fadeDuration = stage.FadeDuration;
+ options.moveDuration = stage.MoveDuration;
+ options.shiftOffset = stage.ShiftOffset;
}
// if no previous portrait, use default portrait
- if (options.character.state.portrait == null)
+ if (options.character.State.portrait == null)
{
- options.character.state.portrait = options.character.profileSprite;
+ options.character.State.portrait = options.character.ProfileSprite;
}
// Selected "use previous portrait"
if (options.portrait == null)
{
- options.portrait = options.character.state.portrait;
+ options.portrait = options.character.State.portrait;
}
// if no previous position, use default position
- if (options.character.state.position == null)
+ if (options.character.State.position == null)
{
- options.character.state.position = stage.defaultPosition.rectTransform;
+ options.character.State.position = stage.DefaultPosition.rectTransform;
}
// Selected "use previous position"
if (options.toPosition == null)
{
- options.toPosition = options.character.state.position;
+ options.toPosition = options.character.State.position;
}
if (options.replacedCharacter != null)
{
// if no previous position, use default position
- if (options.replacedCharacter.state.position == null)
+ if (options.replacedCharacter.State.position == null)
{
- options.replacedCharacter.state.position = stage.defaultPosition.rectTransform;
+ options.replacedCharacter.State.position = stage.DefaultPosition.rectTransform;
}
}
// If swapping, use replaced character's position
if (options.display == DisplayType.Replace)
{
- options.toPosition = options.replacedCharacter.state.position;
+ options.toPosition = options.replacedCharacter.State.position;
}
// Selected "use previous position"
if (options.fromPosition == null)
{
- options.fromPosition = options.character.state.position;
+ options.fromPosition = options.character.State.position;
}
// if portrait not moving, use from position is same as to position
@@ -257,22 +248,22 @@ namespace Fungus
if (options.display == DisplayType.Hide)
{
- options.fromPosition = options.character.state.position;
+ options.fromPosition = options.character.State.position;
}
// if no previous facing direction, use default facing direction
- if (options.character.state.facing == FacingDirection.None)
+ if (options.character.State.facing == FacingDirection.None)
{
- options.character.state.facing = options.character.portraitsFace;
+ options.character.State.facing = options.character.PortraitsFace;
}
// Selected "use previous facing direction"
if (options.facing == FacingDirection.None)
{
- options.facing = options.character.state.facing;
+ options.facing = options.character.State.facing;
}
- if (options.character.state.portraitImage == null)
+ if (options.character.State.portraitImage == null)
{
CreatePortraitObject(options.character, options.fadeDuration);
}
@@ -285,7 +276,7 @@ namespace Fungus
///
///
///
- private void CreatePortraitObject(Character character, float fadeDuration)
+ protected void CreatePortraitObject(Character character, float fadeDuration)
{
// Create a new portrait object
GameObject portraitObj = new GameObject(character.name,
@@ -294,25 +285,25 @@ namespace Fungus
typeof(Image));
// Set it to be a child of the stage
- portraitObj.transform.SetParent(stage.portraitCanvas.transform, true);
+ portraitObj.transform.SetParent(stage.PortraitCanvas.transform, true);
// Configure the portrait image
Image portraitImage = portraitObj.GetComponent();
portraitImage.preserveAspect = true;
- portraitImage.sprite = character.profileSprite;
+ portraitImage.sprite = character.ProfileSprite;
portraitImage.color = new Color(1f, 1f, 1f, 0f);
// LeanTween doesn't handle 0 duration properly
float duration = (fadeDuration > 0f) ? fadeDuration : float.Epsilon;
// Fade in character image (first time)
- LeanTween.alpha(portraitImage.transform as RectTransform, 1f, duration).setEase(stage.fadeEaseType);
+ LeanTween.alpha(portraitImage.transform as RectTransform, 1f, duration).setEase(stage.FadeEaseType);
// Tell character about portrait image
- character.state.portraitImage = portraitImage;
+ character.State.portraitImage = portraitImage;
}
- private IEnumerator WaitUntilFinished(float duration, Action onComplete = null)
+ protected IEnumerator WaitUntilFinished(float duration, Action onComplete = null)
{
// Wait until the timer has expired
// Any method can modify this timer variable to delay continuing.
@@ -330,26 +321,26 @@ namespace Fungus
}
}
- private void SetupPortrait(PortraitOptions options)
+ protected void SetupPortrait(PortraitOptions options)
{
- SetRectTransform(options.character.state.portraitImage.rectTransform, options.fromPosition);
+ SetRectTransform(options.character.State.portraitImage.rectTransform, options.fromPosition);
- if (options.character.state.facing != options.character.portraitsFace)
+ if (options.character.State.facing != options.character.PortraitsFace)
{
- options.character.state.portraitImage.rectTransform.localScale = new Vector3(-1f, 1f, 1f);
+ options.character.State.portraitImage.rectTransform.localScale = new Vector3(-1f, 1f, 1f);
}
else
{
- options.character.state.portraitImage.rectTransform.localScale = new Vector3(1f, 1f, 1f);
+ options.character.State.portraitImage.rectTransform.localScale = new Vector3(1f, 1f, 1f);
}
- if (options.facing != options.character.portraitsFace)
+ if (options.facing != options.character.PortraitsFace)
{
- options.character.state.portraitImage.rectTransform.localScale = new Vector3(-1f, 1f, 1f);
+ options.character.State.portraitImage.rectTransform.localScale = new Vector3(-1f, 1f, 1f);
}
else
{
- options.character.state.portraitImage.rectTransform.localScale = new Vector3(1f, 1f, 1f);
+ options.character.State.portraitImage.rectTransform.localScale = new Vector3(1f, 1f, 1f);
}
}
@@ -380,8 +371,8 @@ namespace Fungus
public void MoveToFront(PortraitOptions options)
{
- options.character.state.portraitImage.transform.SetSiblingIndex(options.character.state.portraitImage.transform.parent.childCount);
- options.character.state.display = DisplayType.MoveToFront;
+ options.character.State.portraitImage.transform.SetSiblingIndex(options.character.State.portraitImage.transform.parent.childCount);
+ options.character.State.display = DisplayType.MoveToFront;
FinishCommand(options);
}
@@ -405,7 +396,7 @@ namespace Fungus
float duration = (options.moveDuration > 0f) ? options.moveDuration : float.Epsilon;
// LeanTween.move uses the anchoredPosition, so all position images must have the same anchor position
- LeanTween.move(options.character.state.portraitImage.gameObject, options.toPosition.position, duration).setEase(stage.fadeEaseType);
+ LeanTween.move(options.character.State.portraitImage.gameObject, options.toPosition.position, duration).setEase(stage.FadeEaseType);
if (options.waitUntilFinished)
{
@@ -493,47 +484,47 @@ namespace Fungus
float duration = (options.fadeDuration > 0f) ? options.fadeDuration : float.Epsilon;
// Fade out a duplicate of the existing portrait image
- if (options.character.state.portraitImage != null)
+ if (options.character.State.portraitImage != null)
{
- GameObject tempGO = GameObject.Instantiate(options.character.state.portraitImage.gameObject);
- tempGO.transform.SetParent(options.character.state.portraitImage.transform, false);
+ GameObject tempGO = GameObject.Instantiate(options.character.State.portraitImage.gameObject);
+ tempGO.transform.SetParent(options.character.State.portraitImage.transform, false);
tempGO.transform.localPosition = Vector3.zero;
- tempGO.transform.localScale = options.character.state.position.localScale;
+ tempGO.transform.localScale = options.character.State.position.localScale;
Image tempImage = tempGO.GetComponent();
- tempImage.sprite = options.character.state.portraitImage.sprite;
+ tempImage.sprite = options.character.State.portraitImage.sprite;
tempImage.preserveAspect = true;
- tempImage.color = options.character.state.portraitImage.color;
+ tempImage.color = options.character.State.portraitImage.color;
- LeanTween.alpha(tempImage.rectTransform, 0f, duration).setEase(stage.fadeEaseType).setOnComplete(() => {
+ LeanTween.alpha(tempImage.rectTransform, 0f, duration).setEase(stage.FadeEaseType).setOnComplete(() => {
Destroy(tempGO);
});
}
// Fade in the new sprite image
- if (options.character.state.portraitImage.sprite != options.portrait ||
- options.character.state.portraitImage.color.a < 1f)
+ if (options.character.State.portraitImage.sprite != options.portrait ||
+ options.character.State.portraitImage.color.a < 1f)
{
- options.character.state.portraitImage.sprite = options.portrait;
- options.character.state.portraitImage.color = new Color(1f, 1f, 1f, 0f);
- LeanTween.alpha(options.character.state.portraitImage.rectTransform, 1f, duration).setEase(stage.fadeEaseType);
+ options.character.State.portraitImage.sprite = options.portrait;
+ options.character.State.portraitImage.color = new Color(1f, 1f, 1f, 0f);
+ LeanTween.alpha(options.character.State.portraitImage.rectTransform, 1f, duration).setEase(stage.FadeEaseType);
}
DoMoveTween(options);
FinishCommand(options);
- if (!stage.charactersOnStage.Contains(options.character))
+ if (!stage.CharactersOnStage.Contains(options.character))
{
- stage.charactersOnStage.Add(options.character);
+ stage.CharactersOnStage.Add(options.character);
}
// Update character state after showing
- options.character.state.onScreen = true;
- options.character.state.display = DisplayType.Show;
- options.character.state.portrait = options.portrait;
- options.character.state.facing = options.facing;
- options.character.state.position = options.toPosition;
+ options.character.State.onScreen = true;
+ options.character.State.display = DisplayType.Show;
+ options.character.State.portrait = options.portrait;
+ options.character.State.facing = options.facing;
+ options.character.State.position = options.toPosition;
}
///
@@ -547,13 +538,13 @@ namespace Fungus
options.character = character;
options.portrait = character.GetPortrait(portrait);
- if (character.state.position == null)
+ if (character.State.position == null)
{
options.toPosition = options.fromPosition = stage.GetPosition("middle");
}
else
{
- options.fromPosition = options.toPosition = character.state.position;
+ options.fromPosition = options.toPosition = character.State.position;
}
Show(options);
@@ -606,7 +597,7 @@ namespace Fungus
{
CleanPortraitOptions(options);
- if (options.character.state.display == DisplayType.None)
+ if (options.character.State.display == DisplayType.None)
{
return;
}
@@ -616,45 +607,45 @@ namespace Fungus
// LeanTween doesn't handle 0 duration properly
float duration = (options.fadeDuration > 0f) ? options.fadeDuration : float.Epsilon;
- LeanTween.alpha(options.character.state.portraitImage.rectTransform, 0f, duration).setEase(stage.fadeEaseType);
+ LeanTween.alpha(options.character.State.portraitImage.rectTransform, 0f, duration).setEase(stage.FadeEaseType);
DoMoveTween(options);
- stage.charactersOnStage.Remove(options.character);
+ stage.CharactersOnStage.Remove(options.character);
//update character state after hiding
- options.character.state.onScreen = false;
- options.character.state.portrait = options.portrait;
- options.character.state.facing = options.facing;
- options.character.state.position = options.toPosition;
- options.character.state.display = DisplayType.Hide;
+ options.character.State.onScreen = false;
+ options.character.State.portrait = options.portrait;
+ options.character.State.facing = options.facing;
+ options.character.State.position = options.toPosition;
+ options.character.State.display = DisplayType.Hide;
FinishCommand(options);
}
public void SetDimmed(Character character, bool dimmedState)
{
- if (character.state.dimmed == dimmedState)
+ if (character.State.dimmed == dimmedState)
{
return;
}
- character.state.dimmed = dimmedState;
+ character.State.dimmed = dimmedState;
Color targetColor = dimmedState ? new Color(0.5f, 0.5f, 0.5f, 1f) : Color.white;
// LeanTween doesn't handle 0 duration properly
- float duration = (stage.fadeDuration > 0f) ? stage.fadeDuration : float.Epsilon;
+ float duration = (stage.FadeDuration > 0f) ? stage.FadeDuration : float.Epsilon;
- LeanTween.color(character.state.portraitImage.rectTransform, targetColor, duration).setEase(stage.fadeEaseType);
+ LeanTween.color(character.State.portraitImage.rectTransform, targetColor, duration).setEase(stage.FadeEaseType);
}
}
///
/// Util functions that I wanted to keep the main class clean of
///
- public class PortraitUtil {
-
+ public class PortraitUtil
+ {
///
/// Convert a Moonsharp table to portrait options
/// If the table returns a null for any of the parameters, it should keep the defaults
@@ -732,7 +723,6 @@ namespace Fungus
options.shiftIntoPlace = table.Get("shiftIntoPlace").CastToBool();
}
- //TODO: Make the next lua command wait when this options is true
if (!table.Get("waitUntilFinished").IsNil())
{
options.waitUntilFinished = table.Get("waitUntilFinished").CastToBool();
@@ -740,6 +730,5 @@ namespace Fungus
return options;
}
-
}
}
diff --git a/Assets/Fungus/Narrative/Scripts/SayDialog.cs b/Assets/Fungus/Narrative/Scripts/SayDialog.cs
index 6bb095ed..c276ec1c 100644
--- a/Assets/Fungus/Narrative/Scripts/SayDialog.cs
+++ b/Assets/Fungus/Narrative/Scripts/SayDialog.cs
@@ -1,17 +1,16 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.UI;
using System;
using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
-
+ ///
+ /// Presents story text to the player in a dialogue box.
+ ///
public class SayDialog : MonoBehaviour
{
// Currently active Say Dialog used to display Say text
@@ -20,16 +19,28 @@ namespace Fungus
// Most recent speaking character
public static Character speakingCharacter;
- public float fadeDuration = 0.25f;
-
- public Button continueButton;
- public Canvas dialogCanvas;
- public Text nameText;
- public Text storyText;
- public Image characterImage;
+ [Tooltip("Duration to fade dialogue in/out")]
+ [SerializeField] protected float fadeDuration = 0.25f;
+
+ [Tooltip("The continue button UI object")]
+ [SerializeField] protected Button continueButton;
+
+ [Tooltip("The canvas UI object")]
+ [SerializeField] protected Canvas dialogCanvas;
+
+ [Tooltip("The name text UI object")]
+ [SerializeField] protected Text nameText;
+
+ [Tooltip("The story text UI object")]
+ [SerializeField] protected Text storyText;
+ public Text StoryText { get { return storyText; } }
+
+ [Tooltip("The character UI object")]
+ [SerializeField] protected Image characterImage;
+ public Image CharacterImage { get { return characterImage; } }
[Tooltip("Adjust width of story text when Character Image is displayed (to avoid overlapping)")]
- public bool fitTextWithImage = true;
+ [SerializeField] protected bool fitTextWithImage = true;
protected float startStoryTextWidth;
protected float startStoryTextInset;
@@ -156,10 +167,10 @@ namespace Fungus
{
Writer writer = GetWriter();
- if (writer.isWriting || writer.isWaitingForInput)
+ if (writer.IsWriting || writer.IsWaitingForInput)
{
writer.Stop();
- while (writer.isWriting || writer.isWaitingForInput)
+ while (writer.IsWriting || writer.IsWaitingForInput)
{
yield return null;
}
@@ -179,7 +190,7 @@ namespace Fungus
}
else if (speakingCharacter != null)
{
- soundEffectClip = speakingCharacter.soundEffect;
+ soundEffectClip = speakingCharacter.SoundEffect;
}
yield return StartCoroutine(writer.Write(text, clearPrevious, waitForInput, stopVoiceover, soundEffectClip, onComplete));
@@ -191,21 +202,17 @@ namespace Fungus
if (continueButton != null)
{
- continueButton.gameObject.SetActive( GetWriter().isWaitingForInput );
+ continueButton.gameObject.SetActive( GetWriter().IsWaitingForInput );
}
}
- /**
- * Tell dialog to fade out if it's finished writing.
- */
+ // Tell dialog to fade out if it's finished writing.
public virtual void FadeOut()
{
fadeWhenDone = true;
}
- /**
- * Stop a Say Dialog while its writing text.
- */
+ // Stop a Say Dialog while its writing text.
public virtual void Stop()
{
fadeWhenDone = true;
@@ -214,7 +221,7 @@ namespace Fungus
protected virtual void UpdateAlpha()
{
- if (GetWriter().isWriting)
+ if (GetWriter().IsWriting)
{
targetAlpha = 1f;
fadeCoolDownTimer = 0.1f;
@@ -273,9 +280,9 @@ namespace Fungus
foreach (Stage stage in Stage.activeStages)
{
- if (stage.dimPortraits)
+ if (stage.DimPortraits)
{
- foreach (Character c in stage.charactersOnStage)
+ foreach (Character c in stage.CharactersOnStage)
{
if (prevSpeakingCharacter != speakingCharacter)
{
@@ -292,7 +299,7 @@ namespace Fungus
}
}
- string characterName = character.nameText;
+ string characterName = character.NameText;
if (characterName == "")
{
@@ -305,7 +312,7 @@ namespace Fungus
characterName = flowchart.SubstituteVariables(characterName);
}
- SetCharacterName(characterName, character.nameColor);
+ SetCharacterName(characterName, character.NameColor);
}
}
@@ -391,25 +398,24 @@ namespace Fungus
// Stop all tweening portraits
foreach( Character c in Character.activeCharacters )
{
- if (c.state.portraitImage != null)
+ if (c.State.portraitImage != null)
{
- if (LeanTween.isTweening(c.state.portraitImage.gameObject))
+ if (LeanTween.isTweening(c.State.portraitImage.gameObject))
{
- LeanTween.cancel(c.state.portraitImage.gameObject, true);
+ LeanTween.cancel(c.State.portraitImage.gameObject, true);
- PortraitController.SetRectTransform(c.state.portraitImage.rectTransform, c.state.position);
- if (c.state.dimmed == true)
+ PortraitController.SetRectTransform(c.State.portraitImage.rectTransform, c.State.position);
+ if (c.State.dimmed == true)
{
- c.state.portraitImage.color = new Color(0.5f, 0.5f, 0.5f, 1f);
+ c.State.portraitImage.color = new Color(0.5f, 0.5f, 0.5f, 1f);
}
else
{
- c.state.portraitImage.color = Color.white;
+ c.State.portraitImage.color = Color.white;
}
}
}
}
}
}
-
}
diff --git a/Assets/Fungus/Narrative/Scripts/Stage.cs b/Assets/Fungus/Narrative/Scripts/Stage.cs
index cfbbce6c..7e29a0d4 100644
--- a/Assets/Fungus/Narrative/Scripts/Stage.cs
+++ b/Assets/Fungus/Narrative/Scripts/Stage.cs
@@ -1,34 +1,48 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.UI;
-using UnityEngine.Events;
using System;
-using System.Collections;
using System.Collections.Generic;
namespace Fungus
{
-
+ ///
+ /// Define a set of screen positions where character sprites can be displayed.
+ ///
[ExecuteInEditMode]
public class Stage : PortraitController
{
- public Canvas portraitCanvas;
- public bool dimPortraits;
- public float fadeDuration = 0.5f;
- public float moveDuration = 1f;
- public LeanTweenType fadeEaseType;
- public LeanTweenType moveEaseType;
- public Vector2 shiftOffset;
- public Image defaultPosition;
- public List positions;
- public RectTransform[] cachedPositions;
- public List charactersOnStage = new List();
-
- [HideInInspector]
+ [SerializeField] protected Canvas portraitCanvas;
+ public Canvas PortraitCanvas { get { return portraitCanvas; } }
+
+ [SerializeField] protected bool dimPortraits;
+ public bool DimPortraits { get { return dimPortraits; } set { dimPortraits = value; } }
+
+ [SerializeField] protected float fadeDuration = 0.5f;
+ public float FadeDuration { get { return fadeDuration; } set { fadeDuration = value; } }
+
+ [SerializeField] protected float moveDuration = 1f;
+ public float MoveDuration { get { return moveDuration; } set { moveDuration = value; } }
+
+ [SerializeField] protected LeanTweenType fadeEaseType;
+ public LeanTweenType FadeEaseType { get { return fadeEaseType; } }
+
+ [SerializeField] protected Vector2 shiftOffset;
+ public Vector2 ShiftOffset { get { return shiftOffset; } }
+
+ [SerializeField] protected Image defaultPosition;
+ public Image DefaultPosition { get { return defaultPosition; } }
+
+ [SerializeField] protected List positions;
+ public List Positions { get { return positions; } }
+
+ [SerializeField] protected RectTransform[] cachedPositions;
+
+ protected List charactersOnStage = new List();
+ [SerializeField] public List CharactersOnStage { get { return charactersOnStage; } }
+
static public List activeStages = new List();
protected virtual void OnEnable()
diff --git a/Assets/Fungus/Sprite/Editor/SetColliderEditor.cs b/Assets/Fungus/Sprite/Editor/SetColliderEditor.cs
index 6b907365..2e271285 100644
--- a/Assets/Fungus/Sprite/Editor/SetColliderEditor.cs
+++ b/Assets/Fungus/Sprite/Editor/SetColliderEditor.cs
@@ -1,12 +1,8 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
using Rotorz.ReorderableList;
namespace Fungus
@@ -41,5 +37,4 @@ namespace Fungus
serializedObject.ApplyModifiedProperties();
}
}
-
}
diff --git a/Assets/Fungus/Sprite/Editor/SpriteMenuItems.cs b/Assets/Fungus/Sprite/Editor/SpriteMenuItems.cs
index b6bdd15b..3fb88e7c 100644
--- a/Assets/Fungus/Sprite/Editor/SpriteMenuItems.cs
+++ b/Assets/Fungus/Sprite/Editor/SpriteMenuItems.cs
@@ -1,15 +1,10 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
-using UnityEngine;
using UnityEditor;
-using System.Collections;
namespace Fungus
{
-
public class SpriteMenuItems
{
[MenuItem("Tools/Fungus/Create/Clickable Sprite", false, 150)]
@@ -36,5 +31,4 @@ namespace Fungus
FlowchartMenuItems.SpawnPrefab("ParallaxSprite");
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Sprite/Scripts/Clickable2D.cs b/Assets/Fungus/Sprite/Scripts/Clickable2D.cs
index e09b0a40..c5b64126 100644
--- a/Assets/Fungus/Sprite/Scripts/Clickable2D.cs
+++ b/Assets/Fungus/Sprite/Scripts/Clickable2D.cs
@@ -1,28 +1,27 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.EventSystems;
namespace Fungus
{
- /**
- * Detects mouse clicks and touches on a Game Object, and sends an event to all Flowchart event handlers in the scene.
- * The Game Object must have a Collider or Collider2D component attached.
- * Use in conjunction with the ObjectClicked Flowchart event handler.
- */
+ ///
+ /// Detects mouse clicks and touches on a Game Object, and sends an event to all Flowchart event handlers in the scene.
+ /// The Game Object must have a Collider or Collider2D component attached.
+ /// Use in conjunction with the ObjectClicked Flowchart event handler.
+ ///
public class Clickable2D : MonoBehaviour, IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler
{
[Tooltip("Is object clicking enabled")]
- public bool clickEnabled = true;
+ [SerializeField] protected bool clickEnabled = true;
+ public bool ClickEnabled { set { clickEnabled = value; } }
[Tooltip("Mouse texture to use when hovering mouse over object")]
- public Texture2D hoverCursor;
+ [SerializeField] protected Texture2D hoverCursor;
[Tooltip("Use the UI Event System to check for clicks. Clicks that hit an overlapping UI object will be ignored. Camera must have a PhysicsRaycaster component, or a Physics2DRaycaster for 2D colliders.")]
- public bool useEventSystem;
+ [SerializeField] protected bool useEventSystem;
#region Legacy OnMouseX methods
protected virtual void OnMouseDown()
diff --git a/Assets/Fungus/Sprite/Scripts/Commands/FadeSprite.cs b/Assets/Fungus/Sprite/Scripts/Commands/FadeSprite.cs
index 5bcbd46b..fcae03ab 100644
--- a/Assets/Fungus/Sprite/Scripts/Commands/FadeSprite.cs
+++ b/Assets/Fungus/Sprite/Scripts/Commands/FadeSprite.cs
@@ -1,15 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Fades a sprite to a target color over a period of time.
+ ///
[CommandInfo("Sprite",
"Fade Sprite",
"Fades a sprite to a target color over a period of time.")]
@@ -37,17 +36,9 @@ namespace Fungus
return;
}
- CameraController cameraController = CameraController.GetInstance();
-
- if (waitUntilFinished)
- {
- cameraController.waiting = true;
- }
-
SpriteFader.FadeSprite(spriteRenderer, _targetColor.Value, _duration.Value, Vector2.zero, delegate {
if (waitUntilFinished)
{
- cameraController.waiting = false;
Continue();
}
});
@@ -94,5 +85,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetClickable2D.cs b/Assets/Fungus/Sprite/Scripts/Commands/SetClickable2D.cs
index d8423f4c..db4068f8 100644
--- a/Assets/Fungus/Sprite/Scripts/Commands/SetClickable2D.cs
+++ b/Assets/Fungus/Sprite/Scripts/Commands/SetClickable2D.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Sets a Clickable2D component to be clickable / non-clickable.
+ ///
[CommandInfo("Sprite",
"Set Clickable 2D",
"Sets a Clickable2D component to be clickable / non-clickable.")]
@@ -16,16 +15,16 @@ namespace Fungus
public class SetClickable2D : Command
{
[Tooltip("Reference to Clickable2D component on a gameobject")]
- public Clickable2D targetClickable2D;
+ [SerializeField] protected Clickable2D targetClickable2D;
[Tooltip("Set to true to enable the component")]
- public BooleanData activeState;
+ [SerializeField] protected BooleanData activeState;
public override void OnEnter()
{
if (targetClickable2D != null)
{
- targetClickable2D.clickEnabled = activeState.Value;
+ targetClickable2D.ClickEnabled = activeState.Value;
}
Continue();
diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetCollider.cs b/Assets/Fungus/Sprite/Scripts/Commands/SetCollider.cs
index 9dfff43a..b6bfcb94 100644
--- a/Assets/Fungus/Sprite/Scripts/Commands/SetCollider.cs
+++ b/Assets/Fungus/Sprite/Scripts/Commands/SetCollider.cs
@@ -1,14 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Sets all collider (2d or 3d) components on the target objects to be active / inactive.
+ ///
[CommandInfo("Sprite",
"Set Collider",
"Sets all collider (2d or 3d) components on the target objects to be active / inactive")]
@@ -16,13 +16,13 @@ namespace Fungus
public class SetCollider : Command
{
[Tooltip("A list of gameobjects containing collider components to be set active / inactive")]
- public List targetObjects = new List();
+ [SerializeField] protected List targetObjects = new List();
[Tooltip("All objects with this tag will have their collider set active / inactive")]
- public string targetTag = "";
+ [SerializeField] protected string targetTag = "";
[Tooltip("Set to true to enable the collider components")]
- public BooleanData activeState;
+ [SerializeField] protected BooleanData activeState;
public override void OnEnter()
{
diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetDraggable2D.cs b/Assets/Fungus/Sprite/Scripts/Commands/SetDraggable2D.cs
index 7183bf97..6006f333 100644
--- a/Assets/Fungus/Sprite/Scripts/Commands/SetDraggable2D.cs
+++ b/Assets/Fungus/Sprite/Scripts/Commands/SetDraggable2D.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Sets a Draggable2D component to be draggable / non-draggable.
+ ///
[CommandInfo("Sprite",
"Set Draggable 2D",
"Sets a Draggable2D component to be draggable / non-draggable.")]
@@ -16,16 +15,16 @@ namespace Fungus
public class SetDraggable2D : Command
{
[Tooltip("Reference to Draggable2D component on a gameobject")]
- public Draggable2D targetDraggable2D;
+ [SerializeField] protected Draggable2D targetDraggable2D;
[Tooltip("Set to true to enable the component")]
- public BooleanData activeState;
+ [SerializeField] protected BooleanData activeState;
public override void OnEnter()
{
if (targetDraggable2D != null)
{
- targetDraggable2D.dragEnabled = activeState.Value;
+ targetDraggable2D.DragEnabled = activeState.Value;
}
Continue();
@@ -46,5 +45,4 @@ namespace Fungus
return new Color32(235, 191, 217, 255);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetLayerOrder.cs b/Assets/Fungus/Sprite/Scripts/Commands/SetLayerOrder.cs
index 04fd7f3c..2712d1a5 100644
--- a/Assets/Fungus/Sprite/Scripts/Commands/SetLayerOrder.cs
+++ b/Assets/Fungus/Sprite/Scripts/Commands/SetLayerOrder.cs
@@ -1,14 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Sets the Renderer sorting layer of every child of a game object. Applies to all Renderers (including mesh, skinned mesh, and sprite).
+ ///
[CommandInfo("Sprite",
"Set Sorting Layer",
"Sets the Renderer sorting layer of every child of a game object. Applies to all Renderers (including mesh, skinned mesh, and sprite).")]
@@ -16,10 +15,10 @@ namespace Fungus
public class SetSortingLayer : Command
{
[Tooltip("Root Object that will have the Sorting Layer set. Any children will also be affected")]
- public GameObject targetObject;
+ [SerializeField] protected GameObject targetObject;
[Tooltip("The New Layer Name to apply")]
- public string sortingLayer;
+ [SerializeField] protected string sortingLayer;
public override void OnEnter()
{
diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetMouseCursor.cs b/Assets/Fungus/Sprite/Scripts/Commands/SetMouseCursor.cs
index 11258890..27361f1a 100644
--- a/Assets/Fungus/Sprite/Scripts/Commands/SetMouseCursor.cs
+++ b/Assets/Fungus/Sprite/Scripts/Commands/SetMouseCursor.cs
@@ -1,13 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Sets the mouse cursor sprite.
+ ///
[CommandInfo("Sprite",
"Set Mouse Cursor",
"Sets the mouse cursor sprite.")]
@@ -15,10 +15,10 @@ namespace Fungus
public class SetMouseCursor : Command
{
[Tooltip("Texture to use for cursor. Will use default mouse cursor if no sprite is specified")]
- public Texture2D cursorTexture;
+ [SerializeField] protected Texture2D cursorTexture;
[Tooltip("The offset from the top left of the texture to use as the target point")]
- public Vector2 hotSpot;
+ [SerializeField] protected Vector2 hotSpot;
// Cached static cursor settings
protected static Texture2D activeCursorTexture;
diff --git a/Assets/Fungus/Sprite/Scripts/Commands/SetSpriteOrder.cs b/Assets/Fungus/Sprite/Scripts/Commands/SetSpriteOrder.cs
index 74a2c562..06f615f1 100644
--- a/Assets/Fungus/Sprite/Scripts/Commands/SetSpriteOrder.cs
+++ b/Assets/Fungus/Sprite/Scripts/Commands/SetSpriteOrder.cs
@@ -1,14 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// Controls the render order of sprites by setting the Order In Layer property of a list of sprites.
+ ///
[CommandInfo("Sprite",
"Set Sprite Order",
"Controls the render order of sprites by setting the Order In Layer property of a list of sprites.")]
@@ -16,10 +16,10 @@ namespace Fungus
public class SetSpriteOrder : Command
{
[Tooltip("List of sprites to set the order in layer property on")]
- public List targetSprites = new List();
+ [SerializeField] protected List targetSprites = new List();
[Tooltip("The order in layer value to set on the target sprites")]
- public IntegerData orderInLayer;
+ [SerializeField] protected IntegerData orderInLayer;
public override void OnEnter()
{
diff --git a/Assets/Fungus/Sprite/Scripts/Commands/ShowSprite.cs b/Assets/Fungus/Sprite/Scripts/Commands/ShowSprite.cs
index edc85516..abec738e 100644
--- a/Assets/Fungus/Sprite/Scripts/Commands/ShowSprite.cs
+++ b/Assets/Fungus/Sprite/Scripts/Commands/ShowSprite.cs
@@ -1,15 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Makes a sprite visible / invisible by setting the color alpha.
+ ///
[CommandInfo("Sprite",
"Show Sprite",
"Makes a sprite visible / invisible by setting the color alpha.")]
@@ -18,13 +17,13 @@ namespace Fungus
public class ShowSprite : Command
{
[Tooltip("Sprite object to be made visible / invisible")]
- public SpriteRenderer spriteRenderer;
+ [SerializeField] protected SpriteRenderer spriteRenderer;
[Tooltip("Make the sprite visible or invisible")]
- public BooleanData _visible = new BooleanData(false);
+ [SerializeField] protected BooleanData _visible = new BooleanData(false);
[Tooltip("Affect the visibility of child sprites")]
- public bool affectChildren = true;
+ [SerializeField] protected bool affectChildren = true;
public override void OnEnter()
{
@@ -84,5 +83,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Sprite/Scripts/Draggable2D.cs b/Assets/Fungus/Sprite/Scripts/Draggable2D.cs
index 8bbb82d1..fd0256c3 100644
--- a/Assets/Fungus/Sprite/Scripts/Draggable2D.cs
+++ b/Assets/Fungus/Sprite/Scripts/Draggable2D.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.EventSystems;
@@ -10,34 +8,34 @@ using UnityEngine.Serialization;
namespace Fungus
{
-
- /**
- * Detects drag and drop interactions on a Game Object, and sends events to all Flowchart event handlers in the scene.
- * The Game Object must have Collider2D & RigidBody components attached.
- * The Collider2D must have the Is Trigger property set to true.
- * The RigidBody would typically have the Is Kinematic property set to true, unless you want the object to move around using physics.
- * Use in conjunction with the Drag Started, Drag Completed, Drag Cancelled, Drag Entered & Drag Exited event handlers.
- */
+ ///
+ /// Detects drag and drop interactions on a Game Object, and sends events to all Flowchart event handlers in the scene.
+ /// The Game Object must have Collider2D & RigidBody components attached.
+ /// The Collider2D must have the Is Trigger property set to true.
+ /// The RigidBody would typically have the Is Kinematic property set to true, unless you want the object to move around using physics.
+ /// Use in conjunction with the Drag Started, Drag Completed, Drag Cancelled, Drag Entered & Drag Exited event handlers.
+ ///
public class Draggable2D : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler, IPointerEnterHandler, IPointerExitHandler
{
[Tooltip("Is object dragging enabled")]
- public bool dragEnabled = true;
+ [SerializeField] protected bool dragEnabled = true;
+ public bool DragEnabled { get { return dragEnabled; } set { dragEnabled = value; } }
[Tooltip("Move object back to its starting position when drag is cancelled")]
[FormerlySerializedAs("returnToStartPos")]
- public bool returnOnCancelled = true;
+ [SerializeField] protected bool returnOnCancelled = true;
[Tooltip("Move object back to its starting position when drag is completed")]
- public bool returnOnCompleted = true;
+ [SerializeField] protected bool returnOnCompleted = true;
[Tooltip("Time object takes to return to its starting position")]
- public float returnDuration = 1f;
+ [SerializeField] protected float returnDuration = 1f;
[Tooltip("Mouse texture to use when hovering mouse over object")]
- public Texture2D hoverCursor;
+ [SerializeField] protected Texture2D hoverCursor;
[Tooltip("Use the UI Event System to check for drag events. Clicks that hit an overlapping UI object will be ignored. Camera must have a PhysicsRaycaster component, or a Physics2DRaycaster for 2D colliders.")]
- public bool useEventSystem;
+ [SerializeField] protected bool useEventSystem;
protected Vector3 startingPosition;
protected bool updatePosition = false;
@@ -225,7 +223,7 @@ namespace Fungus
DragCompleted[] handlers = GetHandlers();
foreach (DragCompleted handler in handlers)
{
- if (handler.draggableObject == this)
+ if (handler.DraggableObject == this)
{
if (handler.IsOverTarget())
{
diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragCancelled.cs b/Assets/Fungus/Sprite/Scripts/EventHandlers/DragCancelled.cs
index 2ca36212..375eb39c 100644
--- a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragCancelled.cs
+++ b/Assets/Fungus/Sprite/Scripts/EventHandlers/DragCancelled.cs
@@ -1,15 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// The block will execute when the player drags an object and releases it without dropping it on a target object.
+ ///
[EventHandlerInfo("Sprite",
"Drag Cancelled",
"The block will execute when the player drags an object and releases it without dropping it on a target object.")]
@@ -17,7 +15,7 @@ namespace Fungus
public class DragCancelled : EventHandler
{
[Tooltip("Draggable object to listen for drag events on")]
- public Draggable2D draggableObject;
+ [SerializeField] protected Draggable2D draggableObject;
public virtual void OnDragCancelled(Draggable2D draggableObject)
{
@@ -37,5 +35,4 @@ namespace Fungus
return "None";
}
}
-
}
diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragCompleted.cs b/Assets/Fungus/Sprite/Scripts/EventHandlers/DragCompleted.cs
index e60991cf..2c94eeb7 100644
--- a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragCompleted.cs
+++ b/Assets/Fungus/Sprite/Scripts/EventHandlers/DragCompleted.cs
@@ -1,15 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// The block will execute when the player drags an object and successfully drops it on a target object.
+ ///
[EventHandlerInfo("Sprite",
"Drag Completed",
"The block will execute when the player drags an object and successfully drops it on a target object.")]
@@ -17,10 +15,12 @@ namespace Fungus
public class DragCompleted : EventHandler
{
[Tooltip("Draggable object to listen for drag events on")]
- public Draggable2D draggableObject;
+ [SerializeField] protected Draggable2D draggableObject;
+
+ public Draggable2D DraggableObject { get { return draggableObject; } }
[Tooltip("Drag target object to listen for drag events on")]
- public Collider2D targetObject;
+ [SerializeField] protected Collider2D targetObject;
// There's no way to poll if an object is touching another object, so
// we have to listen to the callbacks and track the touching state ourselves.
diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragEntered.cs b/Assets/Fungus/Sprite/Scripts/EventHandlers/DragEntered.cs
index 71d03fd9..1362e5a1 100644
--- a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragEntered.cs
+++ b/Assets/Fungus/Sprite/Scripts/EventHandlers/DragEntered.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System;
@@ -10,7 +8,9 @@ using System.Collections.Generic;
namespace Fungus
{
-
+ ///
+ /// The block will execute when the player is dragging an object which starts touching the target object.
+ ///
[EventHandlerInfo("Sprite",
"Drag Entered",
"The block will execute when the player is dragging an object which starts touching the target object.")]
@@ -18,10 +18,10 @@ namespace Fungus
public class DragEntered : EventHandler
{
[Tooltip("Draggable object to listen for drag events on")]
- public Draggable2D draggableObject;
+ [SerializeField] protected Draggable2D draggableObject;
[Tooltip("Drag target object to listen for drag events on")]
- public Collider2D targetObject;
+ [SerializeField] protected Collider2D targetObject;
public virtual void OnDragEntered(Draggable2D draggableObject, Collider2D targetObject)
{
diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragExited.cs b/Assets/Fungus/Sprite/Scripts/EventHandlers/DragExited.cs
index e84f935a..84a5436b 100644
--- a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragExited.cs
+++ b/Assets/Fungus/Sprite/Scripts/EventHandlers/DragExited.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System;
@@ -10,7 +8,9 @@ using System.Collections.Generic;
namespace Fungus
{
-
+ ///
+ /// The block will execute when the player is dragging an object which stops touching the target object.
+ ///
[EventHandlerInfo("Sprite",
"Drag Exited",
"The block will execute when the player is dragging an object which stops touching the target object.")]
@@ -18,10 +18,10 @@ namespace Fungus
public class DragExited : EventHandler
{
[Tooltip("Draggable object to listen for drag events on")]
- public Draggable2D draggableObject;
+ [SerializeField] protected Draggable2D draggableObject;
[Tooltip("Drag target object to listen for drag events on")]
- public Collider2D targetObject;
+ [SerializeField] protected Collider2D targetObject;
public virtual void OnDragExited(Draggable2D draggableObject, Collider2D targetObject)
{
diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragStarted.cs b/Assets/Fungus/Sprite/Scripts/EventHandlers/DragStarted.cs
index 4696c3c6..9c34fa12 100644
--- a/Assets/Fungus/Sprite/Scripts/EventHandlers/DragStarted.cs
+++ b/Assets/Fungus/Sprite/Scripts/EventHandlers/DragStarted.cs
@@ -1,22 +1,20 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
+ ///
+ /// The block will execute when the player starts dragging an object.
+ ///
[EventHandlerInfo("Sprite",
"Drag Started",
"The block will execute when the player starts dragging an object.")]
[AddComponentMenu("")]
public class DragStarted : EventHandler
{
- public Draggable2D draggableObject;
+ [SerializeField] protected Draggable2D draggableObject;
public virtual void OnDragStarted(Draggable2D draggableObject)
{
diff --git a/Assets/Fungus/Sprite/Scripts/EventHandlers/ObjectClicked.cs b/Assets/Fungus/Sprite/Scripts/EventHandlers/ObjectClicked.cs
index ecfb07c8..9ea0c57f 100644
--- a/Assets/Fungus/Sprite/Scripts/EventHandlers/ObjectClicked.cs
+++ b/Assets/Fungus/Sprite/Scripts/EventHandlers/ObjectClicked.cs
@@ -1,13 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// The block will execute when the user clicks or taps on the clickable object.
+ ///
[EventHandlerInfo("Sprite",
"Object Clicked",
"The block will execute when the user clicks or taps on the clickable object.")]
@@ -15,7 +15,7 @@ namespace Fungus
public class ObjectClicked : EventHandler
{
[Tooltip("Object that the user can click or tap on")]
- public Clickable2D clickableObject;
+ [SerializeField] protected Clickable2D clickableObject;
public virtual void OnObjectClicked(Clickable2D clickableObject)
{
diff --git a/Assets/Fungus/Sprite/Scripts/Parallax.cs b/Assets/Fungus/Sprite/Scripts/Parallax.cs
index 988f3a37..57f1bf2e 100644
--- a/Assets/Fungus/Sprite/Scripts/Parallax.cs
+++ b/Assets/Fungus/Sprite/Scripts/Parallax.cs
@@ -1,37 +1,34 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
- /**
- * Attach this component to a sprite object to apply a simple parallax scrolling effect.
- * The horizontal and vertical parallax offset is calculated based on the distance from the camera to the position of the background sprite.
- * The scale parallax is calculated based on the ratio of the camera size to the size of the background sprite. This gives a 'dolly zoom' effect.
- * Accelerometer based parallax is also applied on devices that support it.
- */
+ ///
+ /// Attach this component to a sprite object to apply a simple parallax scrolling effect.
+ /// The horizontal and vertical parallax offset is calculated based on the distance from the camera to the position of the background sprite.
+ /// The scale parallax is calculated based on the ratio of the camera size to the size of the background sprite. This gives a 'dolly zoom' effect.
+ /// Accelerometer based parallax is also applied on devices that support it.
+ ///
public class Parallax : MonoBehaviour
{
- /**
- * The background sprite which this sprite is layered on top of.
- * The position of this sprite is used to calculate the parallax offset.
- */
- public SpriteRenderer backgroundSprite;
+ ///
+ /// The background sprite which this sprite is layered on top of.
+ /// The position of this sprite is used to calculate the parallax offset.
+ ///
+ [SerializeField] protected SpriteRenderer backgroundSprite;
- /**
- * Scale factor for calculating the parallax offset.
- */
- public Vector2 parallaxScale = new Vector2(0.25f, 0f);
+ ///
+ /// Scale factor for calculating the parallax offset.
+ ///
+ [SerializeField] protected Vector2 parallaxScale = new Vector2(0.25f, 0f);
- /**
- * Scale factor for calculating parallax offset based on device accelerometer tilt angle.
- * Set this to 0 to disable the accelerometer parallax effect.
- */
- public float accelerometerScale = 0.5f;
+ ///
+ /// Scale factor for calculating parallax offset based on device accelerometer tilt angle.
+ /// Set this to 0 to disable the accelerometer parallax effect.
+ ///
+ [SerializeField] protected float accelerometerScale = 0.5f;
protected Vector3 startPosition;
protected Vector3 acceleration;
diff --git a/Assets/Fungus/Sprite/Scripts/SpriteFader.cs b/Assets/Fungus/Sprite/Scripts/SpriteFader.cs
index 78c6ca1c..492c3557 100644
--- a/Assets/Fungus/Sprite/Scripts/SpriteFader.cs
+++ b/Assets/Fungus/Sprite/Scripts/SpriteFader.cs
@@ -1,18 +1,15 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System;
-using System.Collections;
namespace Fungus
{
- /**
- * Transitions a sprite from its current color to a target color.
- * An offset can be applied to slide the sprite in while changing color.
- */
+ ///
+ /// Transitions a sprite from its current color to a target color.
+ /// An offset can be applied to slide the sprite in while changing color.
+ ///
[RequireComponent (typeof (SpriteRenderer))]
public class SpriteFader : MonoBehaviour
{
@@ -27,9 +24,9 @@ namespace Fungus
protected Action onFadeComplete;
- /**
- * Attaches a SpriteFader component to a sprite object to transition its color over time.
- */
+ ///
+ /// Attaches a SpriteFader component to a sprite object to transition its color over time.
+ ///
public static void FadeSprite(SpriteRenderer spriteRenderer, Color targetColor, float duration, Vector2 slideOffset, Action onComplete = null)
{
if (spriteRenderer == null)
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt b/Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt
index 4f82e21c..cfe2565d 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt
+++ b/Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt
@@ -86,7 +86,7 @@ end
-- Set active language for string table
function M.setlanguage(languagecode)
- M.luautils.activeLanguage = languagecode
+ M.luautils.ActiveLanguage = languagecode
end
-- Get a named string from the string table
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/DropDownControl.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/DropDownControl.cs
index f613d899..8fd9ad9e 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/DropDownControl.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/DropDownControl.cs
@@ -1,13 +1,10 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
// Adapted from the Unity Test Tools project (MIT license)
// https://bitbucket.org/Unity-Technologies/unitytesttools/src/a30d562427e9/Assets/UnityTestTools/
using System;
-using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/ExecuteHandlerEditor.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/ExecuteHandlerEditor.cs
index 9ddf2672..0b04044d 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/ExecuteHandlerEditor.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/ExecuteHandlerEditor.cs
@@ -1,21 +1,16 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
// Adapted from the Unity Test Tools project (MIT license)
// https://bitbucket.org/Unity-Technologies/unitytesttools/src/a30d562427e9/Assets/UnityTestTools/
using System;
-using System.Collections.Generic;
-using System.Linq;
using System.Reflection;
using UnityEditor;
using UnityEngine;
namespace Fungus
{
-
[CustomEditor(typeof(ExecuteHandler))]
public class ExecuteHandlerEditor : Editor
{
@@ -42,7 +37,7 @@ namespace Fungus
var executeHandler = (ExecuteHandler)target;
EditorGUILayout.BeginHorizontal();
EditorGUILayout.PrefixLabel(new GUIContent("On Event"));
- executeHandler.executeMethods = (ExecuteHandler.ExecuteMethod)EditorGUILayout.EnumMaskField(executeHandler.executeMethods,
+ executeHandler.ExecuteMethods = (ExecuteHandler.ExecuteMethod)EditorGUILayout.EnumMaskField(executeHandler.ExecuteMethods,
EditorStyles.popup,
GUILayout.ExpandWidth(false));
EditorGUILayout.EndHorizontal();
@@ -75,36 +70,36 @@ namespace Fungus
private void DrawOptionsForAfterPeriodOfTime(ExecuteHandler executeHandler)
{
EditorGUILayout.Space();
- executeHandler.executeAfterTime = EditorGUILayout.FloatField(m_GUIExecuteAfterTimeGuiContent,
- executeHandler.executeAfterTime);
- if (executeHandler.executeAfterTime < 0)
- executeHandler.executeAfterTime = 0;
- executeHandler.repeatExecuteTime = EditorGUILayout.Toggle(m_GUIRepeatExecuteTimeGuiContent,
- executeHandler.repeatExecuteTime);
- if (executeHandler.repeatExecuteTime)
+ executeHandler.ExecuteAfterTime = EditorGUILayout.FloatField(m_GUIExecuteAfterTimeGuiContent,
+ executeHandler.ExecuteAfterTime);
+ if (executeHandler.ExecuteAfterTime < 0)
+ executeHandler.ExecuteAfterTime = 0;
+ executeHandler.RepeatExecuteTime = EditorGUILayout.Toggle(m_GUIRepeatExecuteTimeGuiContent,
+ executeHandler.RepeatExecuteTime);
+ if (executeHandler.RepeatExecuteTime)
{
- executeHandler.repeatEveryTime = EditorGUILayout.FloatField(m_GUIRepeatEveryTimeGuiContent,
- executeHandler.repeatEveryTime);
- if (executeHandler.repeatEveryTime < 0)
- executeHandler.repeatEveryTime = 0;
+ executeHandler.RepeatEveryTime = EditorGUILayout.FloatField(m_GUIRepeatEveryTimeGuiContent,
+ executeHandler.RepeatEveryTime);
+ if (executeHandler.RepeatEveryTime < 0)
+ executeHandler.RepeatEveryTime = 0;
}
}
private void DrawOptionsForOnUpdate(ExecuteHandler executeHandler)
{
EditorGUILayout.Space();
- executeHandler.executeAfterFrames = EditorGUILayout.IntField(m_GUIExecuteAfterFramesGuiContent,
- executeHandler.executeAfterFrames);
- if (executeHandler.executeAfterFrames < 1)
- executeHandler.executeAfterFrames = 1;
- executeHandler.repeatExecuteFrame = EditorGUILayout.Toggle(m_GUIRepeatExecuteFrameGuiContent,
- executeHandler.repeatExecuteFrame);
- if (executeHandler.repeatExecuteFrame)
+ executeHandler.ExecuteAfterFrames = EditorGUILayout.IntField(m_GUIExecuteAfterFramesGuiContent,
+ executeHandler.ExecuteAfterFrames);
+ if (executeHandler.ExecuteAfterFrames < 1)
+ executeHandler.ExecuteAfterFrames = 1;
+ executeHandler.RepeatExecuteFrame = EditorGUILayout.Toggle(m_GUIRepeatExecuteFrameGuiContent,
+ executeHandler.RepeatExecuteFrame);
+ if (executeHandler.RepeatExecuteFrame)
{
- executeHandler.repeatEveryFrame = EditorGUILayout.IntField(m_GUIRepeatEveryTimeGuiContent,
- executeHandler.repeatEveryFrame);
- if (executeHandler.repeatEveryFrame < 1)
- executeHandler.repeatEveryFrame = 1;
+ executeHandler.RepeatEveryFrame = EditorGUILayout.IntField(m_GUIRepeatEveryTimeGuiContent,
+ executeHandler.RepeatEveryFrame);
+ if (executeHandler.RepeatEveryFrame < 1)
+ executeHandler.RepeatEveryFrame = 1;
}
}
}
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaBindingsEditor.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaBindingsEditor.cs
index 2734a569..5a1b0b2e 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaBindingsEditor.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaBindingsEditor.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
using UnityEditorInternal;
@@ -10,12 +8,10 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
-using System.IO;
using UnityEditor.Callbacks;
namespace Fungus
{
-
[CustomEditor (typeof(LuaBindings))]
public class LuaBindingsEditor : Editor
{
@@ -205,7 +201,7 @@ namespace Fungus
details.Add("");
LuaBindings luaBindings = target as LuaBindings;
- foreach (LuaBindings.BoundObject boundObject in luaBindings.boundObjects)
+ foreach (LuaBindings.BoundObject boundObject in luaBindings.BoundObjects)
{
UnityEngine.Object inspectObject = boundObject.obj;
if (boundObject.component != null)
@@ -367,14 +363,14 @@ namespace Fungus
// Build a hash of all keys currently in use
HashSet keyhash = new HashSet();
- for (int i = 0; i < luaBindings.boundObjects.Count; ++i)
+ for (int i = 0; i < luaBindings.BoundObjects.Count; ++i)
{
if (i == ignoreIndex)
{
continue;
}
- keyhash.Add(luaBindings.boundObjects[i].key);
+ keyhash.Add(luaBindings.BoundObjects[i].key);
}
// Append a suffix to make the key unique
@@ -412,7 +408,7 @@ namespace Fungus
// Use a temp HashSet to store the list of types.
// The final list is stored as a list of type strings.
HashSet typeSet = new HashSet();
- foreach (LuaBindings.BoundObject boundObject in luaBindings.boundObjects)
+ foreach (LuaBindings.BoundObject boundObject in luaBindings.BoundObjects)
{
if (boundObject.obj == null)
{
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaScriptEditor.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaScriptEditor.cs
index 1bdc81e9..655610e0 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaScriptEditor.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaScriptEditor.cs
@@ -1,17 +1,10 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
-using UnityEditorInternal;
-using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
-
[CustomEditor (typeof(LuaScript))]
public class LuaScriptEditor : Editor
{
@@ -44,13 +37,12 @@ namespace Fungus
{
// Reinitialise if the Lua script is changed while running in editor
LuaScript luaScript = target as LuaScript;
- luaScript.initialised = false;
+ luaScript.Initialised = false;
}
EditorGUILayout.PropertyField(runAsCoroutineProp);
serializedObject.ApplyModifiedProperties();
}
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaStoreEditor.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaStoreEditor.cs
index 1d00226f..27c3e2f0 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaStoreEditor.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaStoreEditor.cs
@@ -1,17 +1,12 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEditor;
-using System.Collections;
-using MoonSharp.Interpreter;
using MoonSharp.Interpreter.Serialization;
namespace Fungus
{
-
[CustomEditor(typeof(LuaStore))]
public class LuaStoreEditor : Editor
{
@@ -21,13 +16,12 @@ namespace Fungus
// Use the Serialization extension to display the contents of the prime table.
LuaStore luaStore = target as LuaStore;
- if (luaStore.primeTable != null)
+ if (luaStore.PrimeTable != null)
{
EditorGUILayout.PrefixLabel(new GUIContent("Inspect Table", "Displays the contents of the fungus.store prime table."));
- string serialized = luaStore.primeTable.Serialize();
+ string serialized = luaStore.PrimeTable.Serialize();
EditorGUILayout.SelectableLabel(serialized, GUILayout.ExpandHeight(true));
}
}
}
-
}
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaUtilsEditor.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaUtilsEditor.cs
index 8f9ff955..09d46182 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaUtilsEditor.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaUtilsEditor.cs
@@ -1,16 +1,9 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using System.IO;
namespace Fungus
{
@@ -69,5 +62,4 @@ namespace Fungus
serializedObject.ApplyModifiedProperties();
}
}
-
}
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/MenuItems.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/MenuItems.cs
index 81816a9f..b61be8ad 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/MenuItems.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/MenuItems.cs
@@ -1,16 +1,12 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEditor;
using System.IO;
-using System.Collections;
namespace Fungus
{
-
public class MenuItems
{
[MenuItem("Tools/Fungus/Create/Lua", false, 2000)]
@@ -126,5 +122,4 @@ namespace Fungus
SpawnPrefab("Prefabs/InfoText", false);
}
}
-
}
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs
index ba08e207..638091c3 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/ExecuteHandler.cs
@@ -1,25 +1,20 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
// Adapted from the Unity Test Tools project (MIT license)
// https://bitbucket.org/Unity-Technologies/unitytesttools/src/a30d562427e9/Assets/UnityTestTools/
using System;
using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
using UnityEngine;
-using MoonSharp.Interpreter;
using Debug = UnityEngine.Debug;
using Object = UnityEngine.Object;
namespace Fungus
{
-
- [Serializable]
+ ///
+ /// Executes an LuaScript component in the same gameobject when a condition occurs.
+ ///
public class ExecuteHandler : MonoBehaviour, IExecuteHandlerConfigurator
{
[Flags]
@@ -52,18 +47,31 @@ namespace Fungus
OnCollisionStay2D = 1 << 24,
}
- [SerializeField] public float executeAfterTime = 1f;
- [SerializeField] public bool repeatExecuteTime = true;
- [SerializeField] public float repeatEveryTime = 1f;
- [SerializeField] public int executeAfterFrames = 1;
- [SerializeField] public bool repeatExecuteFrame = true;
- [SerializeField] public int repeatEveryFrame = 1;
- [SerializeField] public bool hasFailed;
+ [SerializeField] protected float executeAfterTime = 1f;
+ public float ExecuteAfterTime { get { return executeAfterTime; } set { executeAfterTime = value; } }
- [SerializeField] public ExecuteMethod executeMethods = ExecuteMethod.Start;
+ [SerializeField] protected bool repeatExecuteTime = true;
+ public bool RepeatExecuteTime { get { return repeatExecuteTime; } set { repeatExecuteTime = value; } }
+
+ [SerializeField] protected float repeatEveryTime = 1f;
+ public float RepeatEveryTime { get { return repeatEveryTime; } set { repeatEveryTime = value; } }
+
+ [SerializeField] protected int executeAfterFrames = 1;
+ public int ExecuteAfterFrames { get { return executeAfterFrames; } set { executeAfterFrames = value; } }
+
+ [SerializeField] protected bool repeatExecuteFrame = true;
+ public bool RepeatExecuteFrame { get { return repeatExecuteFrame; } set { repeatExecuteFrame = value; } }
+
+ [SerializeField] protected int repeatEveryFrame = 1;
+ public int RepeatEveryFrame { get { return repeatEveryFrame; } set { repeatEveryFrame = value; } }
+
+ [SerializeField] protected bool hasFailed;
+
+ [SerializeField] protected ExecuteMethod executeMethods = ExecuteMethod.Start;
+ public ExecuteMethod ExecuteMethods { get { return executeMethods; } set { executeMethods = value; } }
[Tooltip("Name of the method on a component in this gameobject to call when executing.")]
- public string executeMethodName = "OnExecute";
+ [SerializeField] protected string executeMethodName = "OnExecute";
private int m_ExecuteOnFrame;
@@ -300,5 +308,4 @@ namespace Fungus
ExecuteHandler Component { get; }
}
-
}
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/FungusPrefs.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/FungusPrefs.cs
index d69ce005..b44e3ec1 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/FungusPrefs.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/FungusPrefs.cs
@@ -1,14 +1,10 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
-
///
/// Wrapper class for PlayerPrefs that adds the concept of multiple save slots.
/// Save slots allow you to store multiple player save profiles.
@@ -111,5 +107,4 @@ namespace Fungus
return slot.ToString() + ":" + key;
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/InfoText.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/InfoText.cs
index 4278240b..3b34e88c 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/InfoText.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/InfoText.cs
@@ -1,14 +1,10 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
-
///
/// Displays information text at the top left of the screen.
///
@@ -16,7 +12,7 @@ namespace Fungus
{
[Tooltip("The information text to display")]
[TextArea(20, 20)]
- public string info = "";
+ [SerializeField] protected string info = "";
void OnGUI()
{
@@ -25,5 +21,4 @@ namespace Fungus
GUI.Label(rect, info);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs
index 34b3bbe3..b423420f 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaBindings.cs
@@ -1,19 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System;
-using System.Reflection;
-using System.Linq;
-using System.Collections;
using System.Collections.Generic;
using MoonSharp.Interpreter;
namespace Fungus
{
-
///
/// Base class for a component which registers Lua Bindings.
/// When the Lua Environment initialises, it finds all components in the scene that inherit
@@ -45,31 +39,32 @@ namespace Fungus
}
[Tooltip("Add bindings to every Lua Environment in the scene. If false, only add bindings to a specific Lua Environment.")]
- public bool allEnvironments = true;
+ [SerializeField] protected bool allEnvironments = true;
[Tooltip("The specific LuaEnvironment to register the bindings in.")]
- public LuaEnvironment luaEnvironment;
+ [SerializeField] protected LuaEnvironment luaEnvironment;
///
/// Name of global table variable to store bindings in. If left blank then each binding will be added as a global variable.
///
[Tooltip("Name of global table variable to store bindings in. If left blank then each binding will be added as a global variable.")]
- public string tableName = "";
+ [SerializeField] protected string tableName = "";
[Tooltip("Register all CLR types used by the bound objects so that they can be accessed from Lua. If you don't use this option you will need to register these types yourself.")]
- public bool registerTypes = true;
+ [SerializeField] protected bool registerTypes = true;
[HideInInspector]
- public List boundTypes = new List();
+ [SerializeField] protected List boundTypes = new List();
///
/// The list of Unity objects to be bound for access in Lua.
///
[Tooltip("The list of Unity objects to be bound to make them accessible in Lua script.")]
- public List boundObjects = new List();
+ [SerializeField] protected List boundObjects = new List();
+ public List BoundObjects { get { return boundObjects; } }
[Tooltip("Show inherited public members.")]
- public bool showInherited;
+ [SerializeField] protected bool showInherited;
///
/// Always ensure there is at least one row in the bound objects list.
@@ -176,5 +171,4 @@ namespace Fungus
}
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaEnvironment.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaEnvironment.cs
index fde2fb40..e3778b1b 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaEnvironment.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaEnvironment.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
@@ -9,14 +7,15 @@ using System.Collections.Generic;
using System;
using System.Linq;
using System.Diagnostics;
-using System.Text.RegularExpressions;
using MoonSharp.Interpreter;
-using MoonSharp.Interpreter.Interop;
using MoonSharp.Interpreter.Loaders;
using MoonSharp.RemoteDebugger;
namespace Fungus
{
+ ///
+ /// Wrapper for a MoonSharp Lua Script instance.
+ ///
public class LuaEnvironment : MonoBehaviour
{
///
@@ -106,7 +105,7 @@ namespace Fungus
protected Script interpreter;
///
- /// Returns the MoonSharp interpreter instance used to run Lua code.
+ /// The MoonSharp interpreter instance used to run Lua code.
///
public Script Interpreter { get { return interpreter; } }
@@ -114,7 +113,7 @@ namespace Fungus
/// Launches the remote Lua debugger in your browser and breaks execution at the first executed Lua command.
///
[Tooltip("Launches the remote Lua debugger in your browser and breaks execution at the first executed Lua command. Standalone platform only.")]
- public bool remoteDebugger = false;
+ [SerializeField] protected bool remoteDebugger = false;
///
/// Instance of remote debugging service when debugging option is enabled.
@@ -425,5 +424,4 @@ namespace Fungus
UnityEngine.Debug.LogError(output);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaScript.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaScript.cs
index 1195026f..a37cbb74 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaScript.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaScript.cs
@@ -1,16 +1,9 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
// Adapted from the Unity Test Tools project (MIT license)
// https://bitbucket.org/Unity-Technologies/unitytesttools/src/a30d562427e9/Assets/UnityTestTools/
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
using UnityEngine;
using MoonSharp.Interpreter;
using Debug = UnityEngine.Debug;
@@ -18,39 +11,42 @@ using Object = UnityEngine.Object;
namespace Fungus
{
-
+ ///
+ /// Executes Lua script defined in a string property or in an external file.
+ ///
public class LuaScript : MonoBehaviour
{
///
/// The Lua Environment to use when executing Lua script.
///
[Tooltip("The Lua Environment to use when executing Lua script.")]
- public LuaEnvironment luaEnvironment;
+ [SerializeField] protected LuaEnvironment luaEnvironment;
///
/// Text file containing Lua script to be executed.
///
[Tooltip("Text file containing Lua script to be executed.")]
- public TextAsset luaFile;
+ [SerializeField] protected TextAsset luaFile;
///
/// Lua script to execute.
///
[Tooltip("A Lua string to execute, appended to the contents of Lua File (if one is specified).")]
[TextArea(5, 50)]
- public string luaScript = "";
+ [SerializeField] protected string luaScript = "";
///
/// Run the script as a Lua coroutine so execution can be yielded for asynchronous operations.
///
[Tooltip("Run the script as a Lua coroutine so execution can be yielded for asynchronous operations.")]
- public bool runAsCoroutine = true;
+ [SerializeField] protected bool runAsCoroutine = true;
protected string friendlyName = "";
+ protected bool initialised;
+
// This is public so the editor code can force the component to reinitialise
- [NonSerialized]
- public bool initialised;
+ public bool Initialised { set { initialised = value; } }
// Stores the compiled Lua code for fast execution later.
protected Closure luaFunction;
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaStore.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaStore.cs
index 25d9e1d1..6421689e 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaStore.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaStore.cs
@@ -1,17 +1,11 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
using MoonSharp.Interpreter;
-using MoonSharp.Interpreter.Serialization;
namespace Fungus
{
-
///
/// Wrapper for a prime Lua table that persists across scene loads.
/// This is useful for transferring values from one scene to another. One one LuaStore component may exist
@@ -19,10 +13,12 @@ namespace Fungus
///
public class LuaStore : LuaBindingsBase
{
+ protected Table primeTable;
+
///
/// A Lua table that can be shared between multiple LuaEnvironments.
///
- public Table primeTable;
+ public Table PrimeTable { get { return primeTable; } }
protected bool initialized;
@@ -103,5 +99,4 @@ namespace Fungus
}
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs
index 3d19c8de..d1dcca78 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
@@ -9,16 +7,14 @@ using System.Collections.Generic;
using System;
using System.Linq;
using System.Text;
-using System.Diagnostics;
using System.Text.RegularExpressions;
using MoonSharp.Interpreter;
-using MoonSharp.Interpreter.Interop;
-using MoonSharp.Interpreter.Loaders;
-using MoonSharp.RemoteDebugger;
namespace Fungus
{
-
+ ///
+ /// A collection of utilites to use in Lua for common Unity / Fungus tasks.
+ ///
public class LuaUtils : LuaEnvironment.Initializer, StringSubstituter.ISubstitutionHandler
{
public enum FungusModuleOptions
@@ -33,27 +29,28 @@ namespace Fungus
/// You can also choose to disable loading the fungus module if it's not required by your script.
///
[Tooltip("Controls if the fungus utilities are accessed from globals (e.g. say) or via a fungus variable (e.g. fungus.say)")]
- public FungusModuleOptions fungusModule = FungusModuleOptions.UseGlobalVariables;
+ [SerializeField] protected FungusModuleOptions fungusModule = FungusModuleOptions.UseGlobalVariables;
///
/// The currently selected language in the string table. Affects variable substitution.
///
[Tooltip("The currently selected language in the string table. Affects variable substitution.")]
- public string activeLanguage = "en";
+ [SerializeField] protected string activeLanguage = "en";
+ public string ActiveLanguage { get { return activeLanguage; } set { activeLanguage = value; } }
///
/// Lua script file which defines the global string table used for localisation.
///
[HideInInspector]
[Tooltip("List of JSON text files which contain localized strings. These strings are added to the 'stringTable' table in the Lua environment at startup.")]
- public List stringTables = new List();
+ [SerializeField] protected List stringTables = new List();
///
/// JSON text files listing the c# types that can be accessed from Lua.
///
[HideInInspector]
[Tooltip("JSON text files listing the c# types that can be accessed from Lua.")]
- public List registerTypes = new List();
+ [SerializeField] protected List registerTypes = new List();
///
/// Flag used to avoid startup dependency issues.
@@ -490,5 +487,4 @@ namespace Fungus
SayDialog.activeSayDialog = sayDialog;
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/PODTypeFactory.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/PODTypeFactory.cs
index f6bccea4..421c50e4 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/PODTypeFactory.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/PODTypeFactory.cs
@@ -1,14 +1,10 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
-
///
/// Factory class to create new instances of common POD value types used by Unity.
/// Supports the same types as the SerializedProperty class: Color, Vector2, Vector3, Vector4, Quaternion & Rect.
@@ -85,5 +81,4 @@ namespace Fungus
return new Rect(x,y,width, height);
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/StringSubstituter.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/StringSubstituter.cs
index 50203741..51154444 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/StringSubstituter.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/StringSubstituter.cs
@@ -1,10 +1,7 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -32,11 +29,12 @@ namespace Fungus
protected List substitutionHandlers = new List();
- /**
- * The StringBuilder instance used to substitute strings optimally.
- * This property is public to support client code optimisations.
- */
- public StringBuilder stringBuilder;
+ ///
+ /// The StringBuilder instance used to substitute strings optimally.
+ /// This property is public to support client code optimisations.
+ ///
+ protected StringBuilder stringBuilder;
+ public StringBuilder _StringBuilder { get { return stringBuilder; } }
private int recursionDepth;
@@ -122,7 +120,5 @@ namespace Fungus
return result;
}
-
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Thirdparty/JSON/JSONObject.cs b/Assets/Fungus/Thirdparty/FungusLua/Thirdparty/JSON/JSONObject.cs
index 783c0c32..6a509359 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Thirdparty/JSON/JSONObject.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Thirdparty/JSON/JSONObject.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
#define PRETTY //Comment out when you no longer need to read JSON to disable pretty Print system-wide
//Using doubles will cause errors in VectorTemplates.cs; Unity speaks floats
diff --git a/Assets/Fungus/Thirdparty/FungusLua/Thirdparty/TaskManager/TaskManager.cs b/Assets/Fungus/Thirdparty/FungusLua/Thirdparty/TaskManager/TaskManager.cs
index 893d0308..c6ad78f2 100644
--- a/Assets/Fungus/Thirdparty/FungusLua/Thirdparty/TaskManager/TaskManager.cs
+++ b/Assets/Fungus/Thirdparty/FungusLua/Thirdparty/TaskManager/TaskManager.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
/// TaskManager.cs
/// Copyright (c) 2011, Ken Rockot . All rights reserved.
diff --git a/Assets/Fungus/Thirdparty/Microsoft/ReflectionExtensions.cs b/Assets/Fungus/Thirdparty/Microsoft/ReflectionExtensions.cs
index d4cb61f5..bbfd689d 100644
--- a/Assets/Fungus/Thirdparty/Microsoft/ReflectionExtensions.cs
+++ b/Assets/Fungus/Thirdparty/Microsoft/ReflectionExtensions.cs
@@ -593,5 +593,4 @@ namespace MarkerMetro.Unity.WinLegacy.Reflection
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/UI/Editor/WriteEditor.cs b/Assets/Fungus/UI/Editor/WriteEditor.cs
index 6557f4a4..4d4abf36 100644
--- a/Assets/Fungus/UI/Editor/WriteEditor.cs
+++ b/Assets/Fungus/UI/Editor/WriteEditor.cs
@@ -1,17 +1,11 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
-using UnityEditorInternal;
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
namespace Fungus
{
-
[CustomEditor (typeof(Write))]
public class WriteEditor : CommandEditor
{
@@ -93,6 +87,5 @@ namespace Fungus
serializedObject.ApplyModifiedProperties();
}
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/UI/Editor/WriterAudioEditor.cs b/Assets/Fungus/UI/Editor/WriterAudioEditor.cs
index ed59af19..337cf839 100644
--- a/Assets/Fungus/UI/Editor/WriterAudioEditor.cs
+++ b/Assets/Fungus/UI/Editor/WriterAudioEditor.cs
@@ -1,18 +1,12 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEditor;
-using UnityEditorInternal;
using UnityEngine;
-using System.Collections;
-using System.Collections.Generic;
using Rotorz.ReorderableList;
namespace Fungus
{
-
[CustomEditor (typeof(WriterAudio))]
public class WriterAudioEditor : Editor
{
@@ -57,6 +51,5 @@ namespace Fungus
serializedObject.ApplyModifiedProperties();
}
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/UI/Scripts/Commands/FadeUI.cs b/Assets/Fungus/UI/Scripts/Commands/FadeUI.cs
index 24b09a64..604292d1 100644
--- a/Assets/Fungus/UI/Scripts/Commands/FadeUI.cs
+++ b/Assets/Fungus/UI/Scripts/Commands/FadeUI.cs
@@ -1,17 +1,15 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.UI;
-using System.Collections;
-using System.Collections.Generic;
using Fungus;
namespace Fungus
{
-
+ ///
+ /// Fades a UI object.
+ ///
[CommandInfo("UI",
"Fade UI",
"Fades a UI object")]
@@ -23,11 +21,11 @@ namespace Fungus
Color
}
- public FadeMode fadeMode = FadeMode.Alpha;
+ [SerializeField] protected FadeMode fadeMode = FadeMode.Alpha;
- public ColorData targetColor = new ColorData(Color.white);
+ [SerializeField] protected ColorData targetColor = new ColorData(Color.white);
- public FloatData targetAlpha = new FloatData(1f);
+ [SerializeField] protected FloatData targetAlpha = new FloatData(1f);
protected override void ApplyTween(GameObject go)
{
@@ -153,5 +151,4 @@ namespace Fungus
return true;
}
}
-
}
diff --git a/Assets/Fungus/UI/Scripts/Commands/GetText.cs b/Assets/Fungus/UI/Scripts/Commands/GetText.cs
index 5a2620a9..a074aeee 100644
--- a/Assets/Fungus/UI/Scripts/Commands/GetText.cs
+++ b/Assets/Fungus/UI/Scripts/Commands/GetText.cs
@@ -1,29 +1,27 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.UI;
-using System;
-using System.Collections;
using UnityEngine.Serialization;
namespace Fungus
{
+ ///
+ /// Gets the text property from a UI Text object and stores it in a string variable.
+ ///
[CommandInfo("UI",
"Get Text",
"Gets the text property from a UI Text object and stores it in a string variable.")]
-
[AddComponentMenu("")]
public class GetText : Command
{
[Tooltip("Text object to get text value from")]
- public GameObject targetTextObject;
+ [SerializeField] protected GameObject targetTextObject;
[Tooltip("String variable to store the text value in")]
[VariableProperty(typeof(StringVariable))]
- public StringVariable stringVariable;
+ [SerializeField] protected StringVariable stringVariable;
public override void OnEnter()
{
@@ -39,21 +37,21 @@ namespace Fungus
Text uiText = targetTextObject.GetComponent();
if (uiText != null)
{
- stringVariable.value = uiText.text;
+ stringVariable.Value = uiText.text;
}
else
{
InputField inputField = targetTextObject.GetComponent();
if (inputField != null)
{
- stringVariable.value = inputField.text;
+ stringVariable.Value = inputField.text;
}
else
{
TextMesh textMesh = targetTextObject.GetComponent();
if (textMesh != null)
{
- stringVariable.value = textMesh.text;
+ stringVariable.Value = textMesh.text;
}
}
}
@@ -94,5 +92,4 @@ namespace Fungus
}
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/UI/Scripts/Commands/SetInteractable.cs b/Assets/Fungus/UI/Scripts/Commands/SetInteractable.cs
index 92f0b372..5357c2ab 100644
--- a/Assets/Fungus/UI/Scripts/Commands/SetInteractable.cs
+++ b/Assets/Fungus/UI/Scripts/Commands/SetInteractable.cs
@@ -1,26 +1,25 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.UI;
-using System.Collections;
using System.Collections.Generic;
namespace Fungus
{
-
+ ///
+ /// Set the interactable state of selectable objects.
+ ///
[CommandInfo("UI",
"Set Interactable",
"Set the interactable sate of selectable objects.")]
public class SetInteractable : Command
{
[Tooltip("List of objects to be affected by the command")]
- public List targetObjects = new List();
+ [SerializeField] protected List targetObjects = new List();
[Tooltip("Controls if the selectable UI object be interactable or not")]
- public BooleanData interactableState = new BooleanData(true);
+ [SerializeField] protected BooleanData interactableState = new BooleanData(true);
public override void OnEnter()
{
@@ -97,5 +96,4 @@ namespace Fungus
return false;
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/UI/Scripts/Commands/SetSliderValue.cs b/Assets/Fungus/UI/Scripts/Commands/SetSliderValue.cs
index f9ef29eb..52da60b5 100644
--- a/Assets/Fungus/UI/Scripts/Commands/SetSliderValue.cs
+++ b/Assets/Fungus/UI/Scripts/Commands/SetSliderValue.cs
@@ -1,25 +1,24 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.UI;
-using System.Collections;
namespace Fungus
{
-
+ ///
+ /// Sets the value property of a slider object.
+ ///
[CommandInfo("UI",
"Set Slider Value",
"Sets the value property of a slider object")]
public class SetSliderValue : Command
{
[Tooltip("Target slider object to set the value on")]
- public Slider slider;
+ [SerializeField] protected Slider slider;
[Tooltip("Float value to set the slider value to.")]
- public FloatData value;
+ [SerializeField] protected FloatData value;
public override void OnEnter()
{
@@ -43,5 +42,4 @@ namespace Fungus
return slider.name + " = " + value.GetDescription();
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/UI/Scripts/Commands/SetText.cs b/Assets/Fungus/UI/Scripts/Commands/SetText.cs
index 4aa7255b..8dde092a 100644
--- a/Assets/Fungus/UI/Scripts/Commands/SetText.cs
+++ b/Assets/Fungus/UI/Scripts/Commands/SetText.cs
@@ -1,32 +1,30 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.UI;
-using System;
-using System.Collections;
using UnityEngine.Serialization;
namespace Fungus
{
+ ///
+ /// Sets the text property on a UI Text object and/or an Input Field object.
+ ///
[CommandInfo("UI",
"Set Text",
"Sets the text property on a UI Text object and/or an Input Field object.")]
-
[AddComponentMenu("")]
public class SetText : Command, ILocalizable
{
[Tooltip("Text object to set text on. Can be a UI Text, Text Field or Text Mesh object.")]
- public GameObject targetTextObject;
+ [SerializeField] protected GameObject targetTextObject;
[Tooltip("String value to assign to the text object")]
[FormerlySerializedAs("stringData")]
- public StringDataMulti text;
+ [SerializeField] protected StringDataMulti text;
[Tooltip("Notes about this story text for other authors, localization, etc.")]
- public string description;
+ [SerializeField] protected string description;
public override void OnEnter()
{
@@ -92,10 +90,8 @@ namespace Fungus
}
}
- //
- // ILocalizable implementation
- //
-
+ #region ILocalizable implementation
+
public virtual string GetStandardText()
{
return text;
@@ -116,6 +112,7 @@ namespace Fungus
// String id for Set Text commands is SETTEXT..
return "SETTEXT." + GetFlowchartLocalizationId() + "." + itemId;
}
- }
-
+
+ #endregion
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/UI/Scripts/Commands/TweenUI.cs b/Assets/Fungus/UI/Scripts/Commands/TweenUI.cs
index 0c0a34e8..4cba1bf7 100644
--- a/Assets/Fungus/UI/Scripts/Commands/TweenUI.cs
+++ b/Assets/Fungus/UI/Scripts/Commands/TweenUI.cs
@@ -1,30 +1,28 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using UnityEngine.UI;
-using System.Collections;
using System.Collections.Generic;
using Fungus;
namespace Fungus
{
-
+ ///
+ /// Abstract base class for TweenUI commands.
+ ///
public abstract class TweenUI : Command
{
[Tooltip("List of objects to be affected by the tween")]
- public List targetObjects = new List();
+ [SerializeField] protected List targetObjects = new List();
[Tooltip("Type of tween easing to apply")]
- public LeanTweenType tweenType = LeanTweenType.easeOutQuad;
+ [SerializeField] protected LeanTweenType tweenType = LeanTweenType.easeOutQuad;
[Tooltip("Wait until this command completes before continuing execution")]
- public BooleanData waitUntilFinished = new BooleanData(true);
+ [SerializeField] protected BooleanData waitUntilFinished = new BooleanData(true);
[Tooltip("Time for the tween to complete")]
- public FloatData duration = new FloatData(1f);
+ [SerializeField] protected FloatData duration = new FloatData(1f);
public override void OnEnter()
{
@@ -132,5 +130,4 @@ namespace Fungus
return false;
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/UI/Scripts/Commands/Write.cs b/Assets/Fungus/UI/Scripts/Commands/Write.cs
index c068327e..d4ecf3d2 100644
--- a/Assets/Fungus/UI/Scripts/Commands/Write.cs
+++ b/Assets/Fungus/UI/Scripts/Commands/Write.cs
@@ -1,37 +1,33 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using UnityEngine.UI;
-using System;
-using System.Collections;
-using UnityEngine.Serialization;
namespace Fungus
{
+ ///
+ /// Writes content to a UI Text or Text Mesh object.
+ ///
[CommandInfo("UI",
"Write",
"Writes content to a UI Text or Text Mesh object.")]
-
[AddComponentMenu("")]
public class Write : Command, ILocalizable
{
[Tooltip("Text object to set text on. Text, Input Field and Text Mesh objects are supported.")]
- public GameObject textObject;
+ [SerializeField] protected GameObject textObject;
[Tooltip("String value to assign to the text object")]
- public StringDataMulti text;
+ [SerializeField] protected StringDataMulti text;
[Tooltip("Notes about this story text for other authors, localization, etc.")]
- public string description;
+ [SerializeField] protected string description;
[Tooltip("Clear existing text before writing new text")]
- public bool clearText = true;
+ [SerializeField] protected bool clearText = true;
[Tooltip("Wait until this command finishes before executing the next command")]
- public bool waitUntilFinished = true;
+ [SerializeField] protected bool waitUntilFinished = true;
public enum TextColor
{
@@ -41,11 +37,11 @@ namespace Fungus
SetColor
}
- public TextColor textColor = TextColor.Default;
+ [SerializeField] protected TextColor textColor = TextColor.Default;
- public FloatData setAlpha = new FloatData(1f);
+ [SerializeField] protected FloatData setAlpha = new FloatData(1f);
- public ColorData setColor = new ColorData(Color.white);
+ [SerializeField] protected ColorData setColor = new ColorData(Color.white);
protected Writer GetWriter()
{
@@ -122,9 +118,7 @@ namespace Fungus
GetWriter().Stop();
}
- //
- // ILocalizable implementation
- //
+ #region ILocalizable implementation
public virtual string GetStandardText()
{
@@ -146,6 +140,7 @@ namespace Fungus
// String id for Write commands is WRITE..
return "WRITE." + GetFlowchartLocalizationId() + "." + itemId;
}
- }
+ #endregion
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/UI/Scripts/EventHandlers/ButtonClicked.cs b/Assets/Fungus/UI/Scripts/EventHandlers/ButtonClicked.cs
index 7e1fd8d9..b0ab6971 100644
--- a/Assets/Fungus/UI/Scripts/EventHandlers/ButtonClicked.cs
+++ b/Assets/Fungus/UI/Scripts/EventHandlers/ButtonClicked.cs
@@ -1,14 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.UI;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// The block will execute when the user clicks on the target UI button object.
+ ///
[EventHandlerInfo("UI",
"Button Clicked",
"The block will execute when the user clicks on the target UI button object.")]
@@ -16,7 +16,7 @@ namespace Fungus
public class ButtonClicked : EventHandler
{
[Tooltip("The UI Button that the user can click on")]
- public Button targetButton;
+ [SerializeField] protected Button targetButton;
public virtual void Start()
{
diff --git a/Assets/Fungus/UI/Scripts/EventHandlers/EndEdit.cs b/Assets/Fungus/UI/Scripts/EventHandlers/EndEdit.cs
index 4ff57e9b..4d46b681 100644
--- a/Assets/Fungus/UI/Scripts/EventHandlers/EndEdit.cs
+++ b/Assets/Fungus/UI/Scripts/EventHandlers/EndEdit.cs
@@ -1,14 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.UI;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// The block will execute when the user finishes editing the text in the input field.
+ ///
[EventHandlerInfo("UI",
"End Edit",
"The block will execute when the user finishes editing the text in the input field.")]
@@ -16,7 +16,7 @@ namespace Fungus
public class EndEdit : EventHandler
{
[Tooltip("The UI Input Field that the user can enter text into")]
- public InputField targetInputField;
+ [SerializeField] protected InputField targetInputField;
public virtual void Start()
{
diff --git a/Assets/Fungus/UI/Scripts/SelectOnEnable.cs b/Assets/Fungus/UI/Scripts/SelectOnEnable.cs
index d13c8f26..8b61c4a1 100644
--- a/Assets/Fungus/UI/Scripts/SelectOnEnable.cs
+++ b/Assets/Fungus/UI/Scripts/SelectOnEnable.cs
@@ -3,17 +3,20 @@ using UnityEngine.UI;
namespace Fungus
{
+ ///
+ /// Select the UI element when the gameobject is enabled.
+ ///
[RequireComponent(typeof(Selectable))]
public class SelectOnEnable : MonoBehaviour
{
- private Selectable selectable;
+ protected Selectable selectable;
- private void Awake()
+ protected void Awake()
{
selectable = GetComponent();
}
- private void OnEnable()
+ protected void OnEnable()
{
selectable.Select();
}
diff --git a/Assets/Fungus/UI/Scripts/TextTagParser.cs b/Assets/Fungus/UI/Scripts/TextTagParser.cs
index 0dca8a40..356e7a46 100644
--- a/Assets/Fungus/UI/Scripts/TextTagParser.cs
+++ b/Assets/Fungus/UI/Scripts/TextTagParser.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections.Generic;
@@ -9,7 +7,9 @@ using System.Text.RegularExpressions;
namespace Fungus
{
-
+ ///
+ /// Parses a string for special Fungus text tags.
+ ///
public class TextTagParser
{
public enum TokenType
@@ -315,6 +315,5 @@ namespace Fungus
}
return paramsList;
}
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/UI/Scripts/Writer.cs b/Assets/Fungus/UI/Scripts/Writer.cs
index 9de6b00e..9d5d36cd 100644
--- a/Assets/Fungus/UI/Scripts/Writer.cs
+++ b/Assets/Fungus/UI/Scripts/Writer.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.UI;
@@ -13,10 +11,9 @@ using System.Text;
namespace Fungus
{
-
- /**
- * Implement this interface to be notified about Writer events
- */
+ ///
+ /// Implement this interface to be notified about Writer events.
+ ///
public interface IWriterListener
{
///
@@ -41,40 +38,43 @@ namespace Fungus
/// Called every time the Writer writes a new character glyph.
void OnGlyph();
}
-
+
+ ///
+ /// Writes text using a typewriter effect to a UI text object.
+ ///
public class Writer : MonoBehaviour, IDialogInputListener
{
[Tooltip("Gameobject containing a Text, Inout Field or Text Mesh object to write to")]
- public GameObject targetTextObject;
+ [SerializeField] protected GameObject targetTextObject;
[Tooltip("Gameobject to punch when the punch tags are displayed. If none is set, the main camera will shake instead.")]
- public GameObject punchObject;
+ [SerializeField] protected GameObject punchObject;
[Tooltip("Writing characters per second")]
- public float writingSpeed = 60;
+ [SerializeField] protected float writingSpeed = 60;
[Tooltip("Pause duration for punctuation characters")]
- public float punctuationPause = 0.25f;
+ [SerializeField] protected float punctuationPause = 0.25f;
[Tooltip("Color of text that has not been revealed yet")]
- public Color hiddenTextColor = new Color(1,1,1,0);
+ [SerializeField] protected Color hiddenTextColor = new Color(1,1,1,0);
[Tooltip("Write one word at a time rather one character at a time")]
- public bool writeWholeWords = false;
+ [SerializeField] protected bool writeWholeWords = false;
[Tooltip("Force the target text object to use Rich Text mode so text color and alpha appears correctly")]
- public bool forceRichText = true;
+ [SerializeField] protected bool forceRichText = true;
[Tooltip("Click while text is writing to finish writing immediately")]
- public bool instantComplete = true;
+ [SerializeField] protected bool instantComplete = true;
// This property is true when the writer is waiting for user input to continue
- [System.NonSerialized]
- public bool isWaitingForInput;
+ protected bool isWaitingForInput;
+ public bool IsWaitingForInput { get { return isWaitingForInput; } }
// This property is true when the writer is writing text or waiting (i.e. still processing tokens)
- [System.NonSerialized]
- public bool isWriting;
+ protected bool isWriting;
+ public bool IsWriting { get { return isWriting; } }
protected float currentWritingSpeed;
protected float currentPunctuationPause;
@@ -828,9 +828,9 @@ namespace Fungus
protected virtual void Flash(float duration)
{
CameraController cameraController = CameraController.GetInstance();
- cameraController.screenFadeTexture = CameraController.CreateColorTexture(new Color(1f,1f,1f,1f), 32, 32);
+ cameraController.ScreenFadeTexture = CameraController.CreateColorTexture(new Color(1f,1f,1f,1f), 32, 32);
cameraController.Fade(1f, duration, delegate {
- cameraController.screenFadeTexture = CameraController.CreateColorTexture(new Color(1f,1f,1f,1f), 32, 32);
+ cameraController.ScreenFadeTexture = CameraController.CreateColorTexture(new Color(1f,1f,1f,1f), 32, 32);
cameraController.Fade(0f, duration, null);
});
}
@@ -895,9 +895,8 @@ namespace Fungus
}
}
- //
- // IDialogInputListener implementation
- //
+ #region IDialogInputListener implementation
+
public virtual void OnNextLineEvent()
{
inputFlag = true;
@@ -907,6 +906,7 @@ namespace Fungus
NotifyInput();
}
}
- }
+ #endregion
+ }
}
diff --git a/Assets/Fungus/UI/Scripts/WriterAudio.cs b/Assets/Fungus/UI/Scripts/WriterAudio.cs
index fad29364..9c908329 100644
--- a/Assets/Fungus/UI/Scripts/WriterAudio.cs
+++ b/Assets/Fungus/UI/Scripts/WriterAudio.cs
@@ -1,17 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
using System.Collections.Generic;
namespace Fungus
{
- /*
- * Manages audio effects for Dialogs
- */
+ ///
+ /// Manages audio effects for Dialogs.
+ ///
public class WriterAudio : MonoBehaviour, IWriterListener
{
[Tooltip("Volume level of writing sound effects")]
@@ -74,12 +71,12 @@ namespace Fungus
targetAudioSource.volume = 0f;
}
- /**
- * Plays a voiceover audio clip.
- * Voiceover behaves differently than speaking sound effects because it
- * should keep on playing after the text has finished writing. It also
- * does not pause for wait tags, punctuation, etc.
- */
+ ///
+ /// Plays a voiceover audio clip.
+ /// Voiceover behaves differently than speaking sound effects because it
+ /// should keep on playing after the text has finished writing. It also
+ /// does not pause for wait tags, punctuation, etc.
+ ///
public virtual void PlayVoiceover(AudioClip voiceOverClip)
{
if (targetAudioSource == null)
@@ -174,9 +171,7 @@ namespace Fungus
targetAudioSource.volume = Mathf.MoveTowards(targetAudioSource.volume, targetVolume, Time.deltaTime * 5f);
}
- //
- // IWriterListener implementation
- //
+ #region IWriterListener implementation
public virtual void OnInput()
{
@@ -250,6 +245,7 @@ namespace Fungus
}
}
}
- }
+ #endregion
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/LookFrom.cs b/Assets/Fungus/iTween/Scripts/Commands/LookFrom.cs
index a82021ec..3a875079 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/LookFrom.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/LookFrom.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Instantly rotates a GameObject to look at the supplied Vector3 then returns it to it's starting rotation over time.
+ ///
[CommandInfo("iTween",
"Look From",
"Instantly rotates a GameObject to look at the supplied Vector3 then returns it to it's starting rotation over time.")]
@@ -17,13 +18,13 @@ namespace Fungus
public class LookFrom : iTweenCommand
{
[Tooltip("Target transform that the GameObject will look at")]
- public TransformData _fromTransform;
+ [SerializeField] protected TransformData _fromTransform;
[Tooltip("Target world position that the GameObject will look at, if no From Transform is set")]
- public Vector3Data _fromPosition;
+ [SerializeField] protected Vector3Data _fromPosition;
[Tooltip("Restricts rotation to the supplied axis only")]
- public iTweenAxis axis;
+ [SerializeField] protected iTweenAxis axis;
public override void DoTween()
{
@@ -82,5 +83,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/LookTo.cs b/Assets/Fungus/iTween/Scripts/Commands/LookTo.cs
index a2e9e467..50f93afc 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/LookTo.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/LookTo.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Rotates a GameObject to look at a supplied Transform or Vector3 over time.
+ ///
[CommandInfo("iTween",
"Look To",
"Rotates a GameObject to look at a supplied Transform or Vector3 over time.")]
@@ -17,13 +18,13 @@ namespace Fungus
public class LookTo : iTweenCommand
{
[Tooltip("Target transform that the GameObject will look at")]
- public TransformData _toTransform;
+ [SerializeField] protected TransformData _toTransform;
[Tooltip("Target world position that the GameObject will look at, if no From Transform is set")]
- public Vector3Data _toPosition;
+ [SerializeField] protected Vector3Data _toPosition;
[Tooltip("Restricts rotation to the supplied axis only")]
- public iTweenAxis axis;
+ [SerializeField] protected iTweenAxis axis;
public override void DoTween()
{
@@ -82,5 +83,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/MoveAdd.cs b/Assets/Fungus/iTween/Scripts/Commands/MoveAdd.cs
index 278850c8..0a9f82c2 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/MoveAdd.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/MoveAdd.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Moves a game object by a specified offset over time.
+ ///
[CommandInfo("iTween",
"Move Add",
"Moves a game object by a specified offset over time.")]
@@ -17,10 +18,10 @@ namespace Fungus
public class MoveAdd : iTweenCommand
{
[Tooltip("A translation offset in space the GameObject will animate to")]
- public Vector3Data _offset;
+ [SerializeField] protected Vector3Data _offset;
[Tooltip("Apply the transformation in either the world coordinate or local cordinate system")]
- public Space space = Space.Self;
+ [SerializeField] protected Space space = Space.Self;
public override void DoTween()
{
@@ -54,5 +55,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/MoveFrom.cs b/Assets/Fungus/iTween/Scripts/Commands/MoveFrom.cs
index dad37c38..047e5e4c 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/MoveFrom.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/MoveFrom.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Moves a game object from a specified position back to its starting position over time. The position can be defined by a transform in another object (using To Transform) or by setting an absolute position (using To Position, if To Transform is set to None).
+ ///
[CommandInfo("iTween",
"Move From",
"Moves a game object from a specified position back to its starting position over time. The position can be defined by a transform in another object (using To Transform) or by setting an absolute position (using To Position, if To Transform is set to None).")]
@@ -17,13 +18,13 @@ namespace Fungus
public class MoveFrom : iTweenCommand
{
[Tooltip("Target transform that the GameObject will move from")]
- public TransformData _fromTransform;
+ [SerializeField] protected TransformData _fromTransform;
[Tooltip("Target world position that the GameObject will move from, if no From Transform is set")]
- public Vector3Data _fromPosition;
+ [SerializeField] protected Vector3Data _fromPosition;
[Tooltip("Whether to animate in world space or relative to the parent. False by default.")]
- public bool isLocal;
+ [SerializeField] protected bool isLocal;
public override void DoTween()
{
@@ -71,5 +72,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/MoveTo.cs b/Assets/Fungus/iTween/Scripts/Commands/MoveTo.cs
index ce6cda82..dceb0bbf 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/MoveTo.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/MoveTo.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Moves a game object to a specified position over time. The position can be defined by a transform in another object (using To Transform) or by setting an absolute position (using To Position, if To Transform is set to None).
+ ///
[CommandInfo("iTween",
"Move To",
"Moves a game object to a specified position over time. The position can be defined by a transform in another object (using To Transform) or by setting an absolute position (using To Position, if To Transform is set to None).")]
@@ -17,13 +18,13 @@ namespace Fungus
public class MoveTo : iTweenCommand
{
[Tooltip("Target transform that the GameObject will move to")]
- public TransformData _toTransform;
+ [SerializeField] protected TransformData _toTransform;
[Tooltip("Target world position that the GameObject will move to, if no From Transform is set")]
- public Vector3Data _toPosition;
+ [SerializeField] protected Vector3Data _toPosition;
[Tooltip("Whether to animate in world space or relative to the parent. False by default.")]
- public bool isLocal;
+ [SerializeField] protected bool isLocal;
public override void DoTween()
{
@@ -71,5 +72,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/PunchPosition.cs b/Assets/Fungus/iTween/Scripts/Commands/PunchPosition.cs
index fa486743..812f8a4a 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/PunchPosition.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/PunchPosition.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Applies a jolt of force to a GameObject's position and wobbles it back to its initial position.
+ ///
[CommandInfo("iTween",
"Punch Position",
"Applies a jolt of force to a GameObject's position and wobbles it back to its initial position.")]
@@ -17,10 +18,10 @@ namespace Fungus
public class PunchPosition : iTweenCommand
{
[Tooltip("A translation offset in space the GameObject will animate to")]
- public Vector3Data _amount;
+ [SerializeField] protected Vector3Data _amount;
[Tooltip("Apply the transformation in either the world coordinate or local cordinate system")]
- public Space space = Space.Self;
+ [SerializeField] protected Space space = Space.Self;
public override void DoTween()
{
@@ -54,5 +55,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/PunchRotation.cs b/Assets/Fungus/iTween/Scripts/Commands/PunchRotation.cs
index 4901f4dd..2eadace1 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/PunchRotation.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/PunchRotation.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Applies a jolt of force to a GameObject's rotation and wobbles it back to its initial rotation.
+ ///
[CommandInfo("iTween",
"Punch Rotation",
"Applies a jolt of force to a GameObject's rotation and wobbles it back to its initial rotation.")]
@@ -17,10 +18,10 @@ namespace Fungus
public class PunchRotation : iTweenCommand
{
[Tooltip("A rotation offset in space the GameObject will animate to")]
- public Vector3Data _amount;
+ [SerializeField] protected Vector3Data _amount;
[Tooltip("Apply the transformation in either the world coordinate or local cordinate system")]
- public Space space = Space.Self;
+ [SerializeField] protected Space space = Space.Self;
public override void DoTween()
{
@@ -54,5 +55,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/PunchScale.cs b/Assets/Fungus/iTween/Scripts/Commands/PunchScale.cs
index 6237f0e8..b68ff791 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/PunchScale.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/PunchScale.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Applies a jolt of force to a GameObject's scale and wobbles it back to its initial scale.
+ ///
[CommandInfo("iTween",
"Punch Scale",
"Applies a jolt of force to a GameObject's scale and wobbles it back to its initial scale.")]
@@ -17,7 +18,7 @@ namespace Fungus
public class PunchScale : iTweenCommand
{
[Tooltip("A scale offset in space the GameObject will animate to")]
- public Vector3Data _amount;
+ [SerializeField] protected Vector3Data _amount;
public override void DoTween()
{
@@ -50,5 +51,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/RotateAdd.cs b/Assets/Fungus/iTween/Scripts/Commands/RotateAdd.cs
index c3690bb7..ddbca940 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/RotateAdd.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/RotateAdd.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Rotates a game object by the specified angles over time.
+ ///
[CommandInfo("iTween",
"Rotate Add",
"Rotates a game object by the specified angles over time.")]
@@ -17,10 +18,10 @@ namespace Fungus
public class RotateAdd : iTweenCommand
{
[Tooltip("A rotation offset in space the GameObject will animate to")]
- public Vector3Data _offset;
+ [SerializeField] protected Vector3Data _offset;
[Tooltip("Apply the transformation in either the world coordinate or local cordinate system")]
- public Space space = Space.Self;
+ [SerializeField] protected Space space = Space.Self;
public override void DoTween()
{
@@ -54,5 +55,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/RotateFrom.cs b/Assets/Fungus/iTween/Scripts/Commands/RotateFrom.cs
index 7a9ebec5..95737ea1 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/RotateFrom.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/RotateFrom.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Rotates a game object from the specified angles back to its starting orientation over time.
+ ///
[CommandInfo("iTween",
"Rotate From",
"Rotates a game object from the specified angles back to its starting orientation over time.")]
@@ -17,13 +18,13 @@ namespace Fungus
public class RotateFrom : iTweenCommand
{
[Tooltip("Target transform that the GameObject will rotate from")]
- public TransformData _fromTransform;
+ [SerializeField] protected TransformData _fromTransform;
[Tooltip("Target rotation that the GameObject will rotate from, if no From Transform is set")]
- public Vector3Data _fromRotation;
+ [SerializeField] protected Vector3Data _fromRotation;
[Tooltip("Whether to animate in world space or relative to the parent. False by default.")]
- public bool isLocal;
+ [SerializeField] protected bool isLocal;
public override void DoTween()
{
@@ -71,5 +72,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/RotateTo.cs b/Assets/Fungus/iTween/Scripts/Commands/RotateTo.cs
index e42e3874..b6c964b2 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/RotateTo.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/RotateTo.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Rotates a game object to the specified angles over time.
+ ///
[CommandInfo("iTween",
"Rotate To",
"Rotates a game object to the specified angles over time.")]
@@ -17,13 +18,13 @@ namespace Fungus
public class RotateTo : iTweenCommand
{
[Tooltip("Target transform that the GameObject will rotate to")]
- public TransformData _toTransform;
+ [SerializeField] protected TransformData _toTransform;
[Tooltip("Target rotation that the GameObject will rotate to, if no To Transform is set")]
- public Vector3Data _toRotation;
+ [SerializeField] protected Vector3Data _toRotation;
[Tooltip("Whether to animate in world space or relative to the parent. False by default.")]
- public bool isLocal;
+ [SerializeField] protected bool isLocal;
public override void DoTween()
{
@@ -71,5 +72,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/ScaleAdd.cs b/Assets/Fungus/iTween/Scripts/Commands/ScaleAdd.cs
index b050734b..d149a188 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/ScaleAdd.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/ScaleAdd.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Changes a game object's scale by a specified offset over time.
+ ///
[CommandInfo("iTween",
"Scale Add",
"Changes a game object's scale by a specified offset over time.")]
@@ -17,7 +18,7 @@ namespace Fungus
public class ScaleAdd : iTweenCommand
{
[Tooltip("A scale offset in space the GameObject will animate to")]
- public Vector3Data _offset;
+ [SerializeField] protected Vector3Data _offset;
public override void DoTween()
{
@@ -50,5 +51,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/ScaleFrom.cs b/Assets/Fungus/iTween/Scripts/Commands/ScaleFrom.cs
index 77d51ec2..863bbc93 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/ScaleFrom.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/ScaleFrom.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Changes a game object's scale to the specified value and back to its original scale over time.
+ ///
[CommandInfo("iTween",
"Scale From",
"Changes a game object's scale to the specified value and back to its original scale over time.")]
@@ -17,10 +18,10 @@ namespace Fungus
public class ScaleFrom : iTweenCommand
{
[Tooltip("Target transform that the GameObject will scale from")]
- public TransformData _fromTransform;
+ [SerializeField] protected TransformData _fromTransform;
[Tooltip("Target scale that the GameObject will scale from, if no From Transform is set")]
- public Vector3Data _fromScale;
+ [SerializeField] protected Vector3Data _fromScale;
public override void DoTween()
{
@@ -67,5 +68,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/ScaleTo.cs b/Assets/Fungus/iTween/Scripts/Commands/ScaleTo.cs
index bc39917c..df663fe1 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/ScaleTo.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/ScaleTo.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Changes a game object's scale to a specified value over time.
+ ///
[CommandInfo("iTween",
"Scale To",
"Changes a game object's scale to a specified value over time.")]
@@ -17,10 +18,10 @@ namespace Fungus
public class ScaleTo : iTweenCommand
{
[Tooltip("Target transform that the GameObject will scale to")]
- public TransformData _toTransform;
+ [SerializeField] protected TransformData _toTransform;
[Tooltip("Target scale that the GameObject will scale to, if no To Transform is set")]
- public Vector3Data _toScale = new Vector3Data(Vector3.one);
+ [SerializeField] protected Vector3Data _toScale = new Vector3Data(Vector3.one);
public override void DoTween()
{
@@ -67,5 +68,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/ShakePosition.cs b/Assets/Fungus/iTween/Scripts/Commands/ShakePosition.cs
index 9edfc803..0f1558b5 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/ShakePosition.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/ShakePosition.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Randomly shakes a GameObject's position by a diminishing amount over time.
+ ///
[CommandInfo("iTween",
"Shake Position",
"Randomly shakes a GameObject's position by a diminishing amount over time.")]
@@ -17,13 +18,13 @@ namespace Fungus
public class ShakePosition : iTweenCommand
{
[Tooltip("A translation offset in space the GameObject will animate to")]
- public Vector3Data _amount;
+ [SerializeField] protected Vector3Data _amount;
[Tooltip("Whether to animate in world space or relative to the parent. False by default.")]
- public bool isLocal;
+ [SerializeField] protected bool isLocal;
[Tooltip("Restricts rotation to the supplied axis only")]
- public iTweenAxis axis;
+ [SerializeField] protected iTweenAxis axis;
public override void DoTween()
{
@@ -68,6 +69,5 @@ namespace Fungus
}
#endregion
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/ShakeRotation.cs b/Assets/Fungus/iTween/Scripts/Commands/ShakeRotation.cs
index f83222d9..d3f96cdc 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/ShakeRotation.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/ShakeRotation.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Randomly shakes a GameObject's rotation by a diminishing amount over time.
+ ///
[CommandInfo("iTween",
"Shake Rotation",
"Randomly shakes a GameObject's rotation by a diminishing amount over time.")]
@@ -17,10 +18,10 @@ namespace Fungus
public class ShakeRotation : iTweenCommand
{
[Tooltip("A rotation offset in space the GameObject will animate to")]
- public Vector3Data _amount;
+ [SerializeField] protected Vector3Data _amount;
[Tooltip("Apply the transformation in either the world coordinate or local cordinate system")]
- public Space space = Space.Self;
+ [SerializeField] protected Space space = Space.Self;
public override void DoTween()
{
@@ -53,6 +54,5 @@ namespace Fungus
}
#endregion
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/ShakeScale.cs b/Assets/Fungus/iTween/Scripts/Commands/ShakeScale.cs
index 066272ce..c662a5d8 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/ShakeScale.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/ShakeScale.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
@@ -9,6 +7,9 @@ using System.Collections;
namespace Fungus
{
+ ///
+ /// Randomly shakes a GameObject's rotation by a diminishing amount over time.
+ ///
[CommandInfo("iTween",
"Shake Scale",
"Randomly shakes a GameObject's rotation by a diminishing amount over time.")]
@@ -17,7 +18,7 @@ namespace Fungus
public class ShakeScale : iTweenCommand
{
[Tooltip("A scale offset in space the GameObject will animate to")]
- public Vector3Data _amount;
+ [SerializeField] protected Vector3Data _amount;
public override void DoTween()
{
@@ -49,6 +50,5 @@ namespace Fungus
}
#endregion
- }
-
+ }
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/StopTween.cs b/Assets/Fungus/iTween/Scripts/Commands/StopTween.cs
index a3e411e8..aaf260e7 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/StopTween.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/StopTween.cs
@@ -1,14 +1,14 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Stops an active iTween by name.
+ ///
[CommandInfo("iTween",
"Stop Tween",
"Stops an active iTween by name.")]
@@ -17,7 +17,7 @@ namespace Fungus
public class StopTween : Command
{
[Tooltip("Stop and destroy any Tweens in current scene with the supplied name")]
- public StringData _tweenName;
+ [SerializeField] protected StringData _tweenName;
public override void OnEnter()
{
@@ -40,5 +40,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/StopTweens.cs b/Assets/Fungus/iTween/Scripts/Commands/StopTweens.cs
index 3b8883aa..7f8d6ff3 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/StopTweens.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/StopTweens.cs
@@ -1,13 +1,13 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
-using System.Collections;
namespace Fungus
{
+ ///
+ /// Stop all active iTweens in the current scene.
+ ///
[CommandInfo("iTween",
"Stop Tweens",
"Stop all active iTweens in the current scene.")]
@@ -20,5 +20,4 @@ namespace Fungus
Continue();
}
}
-
}
\ No newline at end of file
diff --git a/Assets/Fungus/iTween/Scripts/Commands/iTweenCommand.cs b/Assets/Fungus/iTween/Scripts/Commands/iTweenCommand.cs
index a59ba1f8..393337c1 100644
--- a/Assets/Fungus/iTween/Scripts/Commands/iTweenCommand.cs
+++ b/Assets/Fungus/iTween/Scripts/Commands/iTweenCommand.cs
@@ -1,11 +1,8 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.Serialization;
-using System.Collections;
namespace Fungus
{
@@ -18,29 +15,32 @@ namespace Fungus
Z
}
+ ///
+ /// Abstract base class for iTween commands.
+ ///
[ExecuteInEditMode]
public abstract class iTweenCommand : Command
{
[Tooltip("Target game object to apply the Tween to")]
- public GameObjectData _targetObject;
+ [SerializeField] protected GameObjectData _targetObject;
[Tooltip("An individual name useful for stopping iTweens by name")]
- public StringData _tweenName;
+ [SerializeField] protected StringData _tweenName;
[Tooltip("The time in seconds the animation will take to complete")]
- public FloatData _duration = new FloatData(1f);
+ [SerializeField] protected FloatData _duration = new FloatData(1f);
[Tooltip("The shape of the easing curve applied to the animation")]
- public iTween.EaseType easeType = iTween.EaseType.easeInOutQuad;
+ [SerializeField] protected iTween.EaseType easeType = iTween.EaseType.easeInOutQuad;
[Tooltip("The type of loop to apply once the animation has completed")]
- public iTween.LoopType loopType = iTween.LoopType.none;
+ [SerializeField] protected iTween.LoopType loopType = iTween.LoopType.none;
[Tooltip("Stop any previously added iTweens on this object before adding this iTween")]
- public bool stopPreviousTweens = false;
+ [SerializeField] protected bool stopPreviousTweens = false;
[Tooltip("Wait until the tween has finished before executing the next command")]
- public bool waitUntilFinished = true;
+ [SerializeField] protected bool waitUntilFinished = true;
public override void OnEnter()
{
@@ -127,5 +127,4 @@ namespace Fungus
#endregion
}
-
}
\ No newline at end of file
diff --git a/Assets/FungusExamples/FungusLua/Bindings/CustomScript.cs b/Assets/FungusExamples/FungusLua/Bindings/CustomScript.cs
index 34129a03..34f58fb9 100644
--- a/Assets/FungusExamples/FungusLua/Bindings/CustomScript.cs
+++ b/Assets/FungusExamples/FungusLua/Bindings/CustomScript.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
@@ -25,5 +23,4 @@ public class CustomScript : MonoBehaviour
Debug.Log("Coroutine finished");
}
-
}
diff --git a/Assets/Tests/Commands/FailTest.cs b/Assets/Tests/Commands/FailTest.cs
index 544bdc2a..e6408041 100644
--- a/Assets/Tests/Commands/FailTest.cs
+++ b/Assets/Tests/Commands/FailTest.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
diff --git a/Assets/Tests/Commands/PassTest.cs b/Assets/Tests/Commands/PassTest.cs
index f71a4fd3..394ceb3c 100644
--- a/Assets/Tests/Commands/PassTest.cs
+++ b/Assets/Tests/Commands/PassTest.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
diff --git a/Assets/Tests/Localisation/LocalisationTests.unity b/Assets/Tests/Localisation/LocalisationTests.unity
index 469958ec..89452934 100644
--- a/Assets/Tests/Localisation/LocalisationTests.unity
+++ b/Assets/Tests/Localisation/LocalisationTests.unity
@@ -8,25 +8,25 @@ SceneSettings:
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
- smallestHole: .25
+ smallestHole: 0.25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
- serializedVersion: 6
+ serializedVersion: 7
m_Fog: 0
- m_FogColor: {r: .5, g: .5, b: .5, a: 1}
+ m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
- m_FogDensity: .00999999978
+ m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
- m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1}
- m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1}
- m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1}
+ m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
+ m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
+ m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SkyboxMaterial: {fileID: 0}
- m_HaloStrength: .5
+ m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
@@ -37,15 +37,12 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
---- !u!127 &3
-LevelGameManager:
- m_ObjectHideFlags: 0
+ m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
- serializedVersion: 5
+ serializedVersion: 7
m_GIWorkflowMode: 1
- m_LightmapsMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
@@ -56,19 +53,25 @@ LightmapSettings:
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
- serializedVersion: 3
+ serializedVersion: 4
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
+ m_AO: 0
m_AOMaxDistance: 1
- m_Padding: 2
m_CompAOExponent: 0
+ m_CompAOExponentDirect: 0
+ m_Padding: 2
m_LightmapParameters: {fileID: 0}
+ m_LightmapsBakeMode: 1
m_TextureCompression: 1
+ m_DirectLightInLightProbes: 1
m_FinalGather: 0
+ m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 1024
- m_LightmapSnapshot: {fileID: 0}
+ m_ReflectionCompression: 2
+ m_LightingDataAsset: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &5
NavMeshSettings:
@@ -76,15 +79,15 @@ NavMeshSettings:
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
- agentRadius: .5
+ agentRadius: 0.5
agentHeight: 2
agentSlope: 45
- agentClimb: .400000006
+ agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
- cellSize: .166666672
+ cellSize: 0.16666667
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &10089112
@@ -112,6 +115,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 344, y: 104, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1417630600}
m_RootOrder: 0
@@ -176,15 +180,16 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 413396327}
m_Father: {fileID: 573033565}
m_RootOrder: 1
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
- m_AnchoredPosition: {x: -38.9000244, y: 38.0749931}
- m_SizeDelta: {x: 77.9000244, y: 77}
- m_Pivot: {x: .5, y: .5}
+ m_AnchoredPosition: {x: -38.900024, y: 38.074993}
+ m_SizeDelta: {x: 77.900024, y: 77}
+ m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &75149105
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -206,11 +211,11 @@ MonoBehaviour:
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
- m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1}
- m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1}
- m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814}
+ m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+ m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
- m_FadeDuration: .100000001
+ m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
@@ -252,6 +257,12 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+ Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 226248ac6f184e448af731df91b91958, type: 3}
m_Type: 0
m_PreserveAspect: 0
@@ -312,6 +323,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 2137889470}
m_RootOrder: 1
@@ -333,6 +345,7 @@ MonoBehaviour:
profileSprite: {fileID: 0}
portraits: []
portraitsFace: 0
+ setSayDialog: {fileID: 0}
description: Character with a . in the name
--- !u!114 &127997295
MonoBehaviour:
@@ -383,7 +396,7 @@ MonoBehaviour:
m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
- m_AllowActivationOnStandalone: 0
+ m_ForceModuleActive: 0
--- !u!114 &207978038
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -400,8 +413,8 @@ MonoBehaviour:
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
- m_RepeatDelay: .5
- m_AllowActivationOnMobileDevice: 0
+ m_RepeatDelay: 0.5
+ m_ForceModuleActive: 0
--- !u!114 &207978039
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -425,9 +438,10 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 5
+ m_RootOrder: 6
--- !u!1 &263238434
GameObject:
m_ObjectHideFlags: 0
@@ -465,9 +479,10 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 2
+ m_RootOrder: 3
--- !u!1 &292727465
GameObject:
m_ObjectHideFlags: 0
@@ -483,7 +498,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
- m_IsActive: 1
+ m_IsActive: 0
--- !u!4 &292727466
Transform:
m_ObjectHideFlags: 0
@@ -493,6 +508,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 550373449}
- {fileID: 331926889}
@@ -500,7 +516,7 @@ Transform:
- {fileID: 1141038908}
- {fileID: 622392413}
m_Father: {fileID: 0}
- m_RootOrder: 4
+ m_RootOrder: 5
--- !u!114 &292727467
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -547,6 +563,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 292727466}
m_RootOrder: 1
@@ -601,6 +618,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@@ -631,6 +649,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 75149104}
m_RootOrder: 0
@@ -638,7 +657,7 @@ RectTransform:
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
- m_Pivot: {x: .5, y: .5}
+ m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &413396328
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -652,7 +671,13 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
- m_Color: {r: .196078435, g: .196078435, b: .196078435, a: 1}
+ m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
+ m_RaycastTarget: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+ Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
@@ -661,6 +686,7 @@ MonoBehaviour:
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
+ m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
@@ -698,13 +724,14 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 587159260}
- {fileID: 1242222013}
- {fileID: 550868903}
- {fileID: 2104226804}
m_Father: {fileID: 0}
- m_RootOrder: 3
+ m_RootOrder: 4
--- !u!114 &453921375
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -755,13 +782,14 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1202770049}
- {fileID: 573033565}
m_Father: {fileID: 550373449}
m_RootOrder: 0
- m_AnchorMin: {x: .5, y: 0}
- m_AnchorMax: {x: .5, y: 0}
+ m_AnchorMin: {x: 0.5, y: 0}
+ m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: -805, y: 0}
m_SizeDelta: {x: 1605, y: 335}
m_Pivot: {x: 0, y: 0}
@@ -822,6 +850,12 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+ Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: eeb00f6cd27e9ef4d9174551b3342dec, type: 3}
m_Type: 0
m_PreserveAspect: 1
@@ -862,6 +896,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 2137889470}
m_RootOrder: 2
@@ -913,6 +948,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 459263863}
m_Father: {fileID: 292727466}
@@ -934,14 +970,13 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 3a0bbe22c246e4c78ad8e9816cbae9d5, type: 3}
m_Name:
m_EditorClassIdentifier:
- fadeDuration: .25
+ fadeDuration: 0.25
continueButton: {fileID: 75149105}
dialogCanvas: {fileID: 550373451}
nameText: {fileID: 1167023090}
storyText: {fileID: 573033563}
characterImage: {fileID: 1202770050}
fitTextWithImage: 1
- textWidthScale: .800000012
--- !u!223 &550373451
Canvas:
m_ObjectHideFlags: 0
@@ -958,8 +993,10 @@ Canvas:
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
+ m_SortingBucketNormalizedSize: 0
m_SortingLayerID: 0
m_SortingOrder: 1
+ m_TargetDisplay: 0
--- !u!114 &550373452
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -973,10 +1010,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
clickMode: 1
- keyPressMode: 2
- shiftKeyEnabled: 1
nextClickDelay: 0
- keyList: 0900000020000000
+ cancelEnabled: 1
+ ignoreMenuClicks: 1
--- !u!82 &550373453
AudioSource:
m_ObjectHideFlags: 0
@@ -993,6 +1029,7 @@ AudioSource:
m_Pitch: 1
Loop: 0
Mute: 0
+ Spatialize: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
@@ -1017,6 +1054,7 @@ AudioSource:
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
+ m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
@@ -1027,6 +1065,7 @@ AudioSource:
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
+ m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
@@ -1037,6 +1076,7 @@ AudioSource:
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
+ m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
@@ -1047,6 +1087,7 @@ AudioSource:
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
+ m_RotationOrder: 4
--- !u!114 &550373454
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1082,10 +1123,13 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 573033561}
+ punchObject: {fileID: 0}
writingSpeed: 60
- punctuationPause: .25
+ punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
writeWholeWords: 0
+ forceRichText: 1
+ instantComplete: 1
--- !u!114 &550373456
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1162,6 +1206,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 453921374}
m_RootOrder: 2
@@ -1230,14 +1275,21 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+ Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 12800000, guid: 79197ecfbc3a4294a89ce589dac02cf2, type: 3}
m_FontSize: 50
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
- m_MaxSize: 40
+ m_MaxSize: 50
m_Alignment: 0
+ m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
@@ -1260,6 +1312,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1167023089}
- {fileID: 75149104}
@@ -1267,9 +1320,9 @@ RectTransform:
m_RootOrder: 1
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
- m_AnchoredPosition: {x: 799, y: 145.630005}
+ m_AnchoredPosition: {x: 799, y: 145.63}
m_SizeDelta: {x: 1531, y: 200}
- m_Pivot: {x: .5, y: .5}
+ m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &587159254
GameObject:
m_ObjectHideFlags: 0
@@ -1306,7 +1359,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
- version: 1.0
+ version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
@@ -1328,6 +1381,10 @@ MonoBehaviour:
hideComponents: 1
saveSelection: 1
localizationId:
+ showLineNumbers: 0
+ hideCommands: []
+ luaEnvironment: {fileID: 0}
+ luaBindingName: flowchart
--- !u!114 &587159256
MonoBehaviour:
m_ObjectHideFlags: 2
@@ -1340,7 +1397,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
textObject: {fileID: 1134558494}
text:
@@ -1409,7 +1465,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 3
- errorMessage:
indentLevel: 0
textObject: {fileID: 1134558494}
text:
@@ -1434,6 +1489,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 453921374}
m_RootOrder: 0
@@ -1449,9 +1505,11 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 2
- errorMessage:
indentLevel: 0
- languageCode: FR
+ _languageCode:
+ stringRef: {fileID: 0}
+ stringVal:
+ languageCodeOLD: FR
--- !u!114 &587159262
MonoBehaviour:
m_ObjectHideFlags: 2
@@ -1464,9 +1522,11 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 4
- errorMessage:
indentLevel: 0
- duration: 1
+ _duration:
+ floatRef: {fileID: 0}
+ floatVal: 1
+ durationOLD: 1
--- !u!114 &587159263
MonoBehaviour:
m_ObjectHideFlags: 2
@@ -1479,7 +1539,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 6
- errorMessage:
indentLevel: 0
targetTextObject: {fileID: 1748886008}
text:
@@ -1499,7 +1558,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 5
- errorMessage:
indentLevel: 0
targetTextObject: {fileID: 1748886008}
text:
@@ -1552,6 +1610,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 292727466}
m_RootOrder: 4
@@ -1614,7 +1673,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
- version: 1.0
+ version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
@@ -1638,6 +1697,10 @@ MonoBehaviour:
hideComponents: 1
saveSelection: 1
localizationId:
+ showLineNumbers: 0
+ hideCommands: []
+ luaEnvironment: {fileID: 0}
+ luaBindingName: flowchart
--- !u!114 &679750557
MonoBehaviour:
m_ObjectHideFlags: 2
@@ -1650,7 +1713,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
storyText: Say text
description:
@@ -1662,6 +1724,7 @@ MonoBehaviour:
extendPrevious: 0
fadeWhenDone: 1
waitForClick: 1
+ stopVoiceover: 1
setSayDialog: {fileID: 0}
--- !u!114 &679750558
MonoBehaviour:
@@ -1700,7 +1763,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 2
- errorMessage:
indentLevel: 0
text: Option text
description:
@@ -1758,10 +1820,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 5
- errorMessage:
indentLevel: 0
targetFlowchart: {fileID: 0}
targetBlock: {fileID: 679750558}
+ startIndex: 0
callMode: 2
--- !u!4 &679750563
Transform:
@@ -1772,6 +1834,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 292727466}
m_RootOrder: 2
@@ -1811,10 +1874,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 9
- errorMessage:
indentLevel: 0
targetFlowchart: {fileID: 0}
targetBlock: {fileID: 679750558}
+ startIndex: 0
callMode: 0
--- !u!114 &679750566
MonoBehaviour:
@@ -1828,9 +1891,11 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 8
- errorMessage:
indentLevel: 0
- languageCode: FR
+ _languageCode:
+ stringRef: {fileID: 0}
+ stringVal: FR
+ languageCodeOLD:
--- !u!114 &679750567
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1843,7 +1908,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 10
- errorMessage:
indentLevel: 0
sayDialog: {fileID: 550373450}
--- !u!1 &810272371
@@ -1876,6 +1940,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 2137889470}
m_RootOrder: 0
@@ -1891,7 +1956,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
- version: 1.0
+ version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
@@ -1913,6 +1978,10 @@ MonoBehaviour:
hideComponents: 1
saveSelection: 1
localizationId:
+ showLineNumbers: 0
+ hideCommands: []
+ luaEnvironment: {fileID: 0}
+ luaBindingName: flowchart
--- !u!114 &810272374
MonoBehaviour:
m_ObjectHideFlags: 2
@@ -1964,7 +2033,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
storyText: English
description:
@@ -1976,6 +2044,7 @@ MonoBehaviour:
extendPrevious: 0
fadeWhenDone: 1
waitForClick: 1
+ stopVoiceover: 1
setSayDialog: {fileID: 0}
--- !u!114 &810272377
MonoBehaviour:
@@ -1989,9 +2058,11 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 2
- errorMessage:
indentLevel: 0
- languageCode: FR
+ _languageCode:
+ stringRef: {fileID: 0}
+ stringVal:
+ languageCodeOLD: FR
--- !u!114 &810272378
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -2004,7 +2075,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 3
- errorMessage:
indentLevel: 0
sayDialog: {fileID: 852108034}
--- !u!1 &852108032
@@ -2041,6 +2111,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1462743519}
m_Father: {fileID: 2137889470}
@@ -2062,14 +2133,13 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 3a0bbe22c246e4c78ad8e9816cbae9d5, type: 3}
m_Name:
m_EditorClassIdentifier:
- fadeDuration: .25
+ fadeDuration: 0.25
continueButton: {fileID: 1201920634}
dialogCanvas: {fileID: 852108035}
nameText: {fileID: 1909138197}
storyText: {fileID: 1225097381}
characterImage: {fileID: 1252195753}
fitTextWithImage: 1
- textWidthScale: .800000012
--- !u!223 &852108035
Canvas:
m_ObjectHideFlags: 0
@@ -2086,8 +2156,10 @@ Canvas:
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
+ m_SortingBucketNormalizedSize: 0
m_SortingLayerID: 0
m_SortingOrder: 1
+ m_TargetDisplay: 0
--- !u!114 &852108036
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -2101,10 +2173,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
clickMode: 1
- keyPressMode: 2
- shiftKeyEnabled: 1
nextClickDelay: 0
- keyList: 0900000020000000
+ cancelEnabled: 1
+ ignoreMenuClicks: 1
--- !u!82 &852108037
AudioSource:
m_ObjectHideFlags: 0
@@ -2121,6 +2192,7 @@ AudioSource:
m_Pitch: 1
Loop: 0
Mute: 0
+ Spatialize: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
@@ -2145,6 +2217,7 @@ AudioSource:
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
+ m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
@@ -2155,6 +2228,7 @@ AudioSource:
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
+ m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
@@ -2165,6 +2239,7 @@ AudioSource:
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
+ m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
@@ -2175,6 +2250,7 @@ AudioSource:
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
+ m_RotationOrder: 4
--- !u!114 &852108038
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -2210,10 +2286,13 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 1225097379}
+ punchObject: {fileID: 0}
writingSpeed: 60
- punctuationPause: .25
+ punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
writeWholeWords: 0
+ forceRichText: 1
+ instantComplete: 1
--- !u!114 &852108040
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -2314,14 +2393,14 @@ Camera:
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
- m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
+ m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
- near clip plane: .300000012
+ near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 1
@@ -2333,10 +2412,11 @@ Camera:
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
+ m_TargetEye: 3
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
- m_StereoSeparation: .0219999999
+ m_StereoSeparation: 0.022
m_StereoMirrorMode: 0
--- !u!4 &881473897
Transform:
@@ -2347,9 +2427,10 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 0
+ m_RootOrder: 1
--- !u!1 &1134558494
GameObject:
m_ObjectHideFlags: 0
@@ -2376,14 +2457,15 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1242222013}
m_RootOrder: 0
- m_AnchorMin: {x: .5, y: .5}
- m_AnchorMax: {x: .5, y: .5}
+ m_AnchorMin: {x: 0.5, y: 0.5}
+ m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 33, y: 139}
m_SizeDelta: {x: 550, y: 50}
- m_Pivot: {x: .5, y: .5}
+ m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1134558496
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -2397,6 +2479,12 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+ Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 30
@@ -2405,6 +2493,7 @@ MonoBehaviour:
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 0
+ m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
@@ -2441,6 +2530,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 292727466}
m_RootOrder: 3
@@ -2462,6 +2552,7 @@ MonoBehaviour:
profileSprite: {fileID: 0}
portraits: []
portraitsFace: 0
+ setSayDialog: {fileID: 0}
description:
--- !u!1 &1167023088
GameObject:
@@ -2490,6 +2581,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 573033565}
m_RootOrder: 0
@@ -2497,7 +2589,7 @@ RectTransform:
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 588.75, y: 235.37001}
m_SizeDelta: {x: 1178.5, y: 71}
- m_Pivot: {x: .5, y: .5}
+ m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1167023090
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -2511,15 +2603,22 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
- m_Color: {r: .258823544, g: .254901975, b: .262745112, a: 1}
+ m_Color: {r: 0.25882354, g: 0.25490198, b: 0.2627451, a: 1}
+ m_RaycastTarget: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+ Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 12800000, guid: bb145366ce7024469a5758b08d31802c, type: 3}
m_FontSize: 50
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
- m_MaxSize: 40
+ m_MaxSize: 50
m_Alignment: 0
+ m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 0
@@ -2560,15 +2659,16 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1868087100}
m_Father: {fileID: 1462743519}
m_RootOrder: 3
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
- m_AnchoredPosition: {x: 1533.59998, y: 83.8300018}
- m_SizeDelta: {x: 77.9000015, y: 77}
- m_Pivot: {x: .5, y: .5}
+ m_AnchoredPosition: {x: 1533.6, y: 83.83}
+ m_SizeDelta: {x: 77.9, y: 77}
+ m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1201920634
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -2590,11 +2690,11 @@ MonoBehaviour:
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
- m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1}
- m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1}
- m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814}
+ m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+ m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
- m_FadeDuration: .100000001
+ m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
@@ -2636,6 +2736,12 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+ Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 226248ac6f184e448af731df91b91958, type: 3}
m_Type: 0
m_PreserveAspect: 0
@@ -2679,14 +2785,15 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 459263863}
m_RootOrder: 0
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
- m_AnchoredPosition: {x: 1386, y: 263.130005}
+ m_AnchoredPosition: {x: 1386, y: 263.13}
m_SizeDelta: {x: 357, y: 435}
- m_Pivot: {x: .5, y: .5}
+ m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1202770050
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -2701,6 +2808,12 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+ Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: ea8f56c43254d41728f5ac4e8299b6c9, type: 3}
m_Type: 0
m_PreserveAspect: 1
@@ -2786,14 +2899,21 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+ Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 12800000, guid: 79197ecfbc3a4294a89ce589dac02cf2, type: 3}
m_FontSize: 50
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
- m_MaxSize: 40
+ m_MaxSize: 50
m_Alignment: 0
+ m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
@@ -2816,14 +2936,15 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1462743519}
m_RootOrder: 2
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
- m_AnchoredPosition: {x: 803, y: 145.630005}
+ m_AnchoredPosition: {x: 803, y: 145.63}
m_SizeDelta: {x: 1539, y: 199.75}
- m_Pivot: {x: .5, y: .5}
+ m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1242222009
GameObject:
m_ObjectHideFlags: 0
@@ -2894,8 +3015,10 @@ Canvas:
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
+ m_SortingBucketNormalizedSize: 0
m_SortingLayerID: 0
m_SortingOrder: 0
+ m_TargetDisplay: 0
--- !u!224 &1242222013
RectTransform:
m_ObjectHideFlags: 0
@@ -2905,6 +3028,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1134558495}
- {fileID: 1748886011}
@@ -2943,6 +3067,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1462743519}
m_RootOrder: 1
@@ -2950,7 +3075,7 @@ RectTransform:
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 1435, y: 404}
m_SizeDelta: {x: 300, y: 300}
- m_Pivot: {x: .5, y: .5}
+ m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1252195753
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -2965,6 +3090,12 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+ Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: ea8f56c43254d41728f5ac4e8299b6c9, type: 3}
m_Type: 0
m_PreserveAspect: 1
@@ -3024,6 +3155,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 2137889470}
m_RootOrder: 3
@@ -3094,10 +3226,11 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 10089113}
m_Father: {fileID: 0}
- m_RootOrder: 1
+ m_RootOrder: 2
--- !u!1 &1462743518
GameObject:
m_ObjectHideFlags: 0
@@ -3127,6 +3260,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1909138196}
- {fileID: 1252195752}
@@ -3134,8 +3268,8 @@ RectTransform:
- {fileID: 1201920633}
m_Father: {fileID: 852108033}
m_RootOrder: 0
- m_AnchorMin: {x: .5, y: 0}
- m_AnchorMax: {x: .5, y: 0}
+ m_AnchorMin: {x: 0.5, y: 0}
+ m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: -805, y: 0}
m_SizeDelta: {x: 1605, y: 335}
m_Pivot: {x: 0, y: 0}
@@ -3196,6 +3330,12 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+ Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: eeb00f6cd27e9ef4d9174551b3342dec, type: 3}
m_Type: 0
m_PreserveAspect: 1
@@ -3241,6 +3381,12 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+ Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 30
@@ -3249,6 +3395,7 @@ MonoBehaviour:
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 0
+ m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
@@ -3269,14 +3416,15 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1242222013}
m_RootOrder: 1
- m_AnchorMin: {x: .5, y: .5}
- m_AnchorMax: {x: .5, y: .5}
+ m_AnchorMin: {x: 0.5, y: 0.5}
+ m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 33, y: 89}
m_SizeDelta: {x: 550, y: 50}
- m_Pivot: {x: .5, y: .5}
+ m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1831350803
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -3324,6 +3472,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1201920633}
m_RootOrder: 0
@@ -3331,7 +3480,7 @@ RectTransform:
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
- m_Pivot: {x: .5, y: .5}
+ m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1868087101
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -3345,7 +3494,13 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
- m_Color: {r: .196078435, g: .196078435, b: .196078435, a: 1}
+ m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
+ m_RaycastTarget: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+ Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
@@ -3354,6 +3509,7 @@ MonoBehaviour:
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
+ m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
@@ -3393,6 +3549,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1462743519}
m_RootOrder: 0
@@ -3400,7 +3557,7 @@ RectTransform:
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 622.25, y: 281}
m_SizeDelta: {x: 1178.5, y: 71}
- m_Pivot: {x: .5, y: .5}
+ m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1909138197
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -3414,15 +3571,22 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
- m_Color: {r: .258823544, g: .254901975, b: .262745112, a: 1}
+ m_Color: {r: 0.25882354, g: 0.25490198, b: 0.2627451, a: 1}
+ m_RaycastTarget: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+ Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 12800000, guid: bb145366ce7024469a5758b08d31802c, type: 3}
m_FontSize: 50
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
- m_MaxSize: 40
+ m_MaxSize: 50
m_Alignment: 0
+ m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 0
@@ -3447,7 +3611,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
go: {fileID: 331926888}
- thisPropertyPath: Localization.activeLanguage
+ thisPropertyPath: Localization.ActiveLanguage
compareToType: 1
other: {fileID: 0}
otherPropertyPath:
@@ -3481,8 +3645,9 @@ Transform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2104226803}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 420.761017, y: 174.027649, z: 0}
+ m_LocalPosition: {x: 420.76102, y: 174.02765, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 453921374}
m_RootOrder: 3
@@ -3616,6 +3781,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 810272372}
- {fileID: 104143438}
@@ -3623,4 +3789,4 @@ Transform:
- {fileID: 1364030185}
- {fileID: 852108033}
m_Father: {fileID: 0}
- m_RootOrder: 6
+ m_RootOrder: 7
diff --git a/Assets/Tests/Localisation/Scripts/TestLoadingCSV.cs b/Assets/Tests/Localisation/Scripts/TestLoadingCSV.cs
index 09aa1555..2ce9623b 100644
--- a/Assets/Tests/Localisation/Scripts/TestLoadingCSV.cs
+++ b/Assets/Tests/Localisation/Scripts/TestLoadingCSV.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
diff --git a/Assets/Tests/Lua/DummyCollection.cs b/Assets/Tests/Lua/DummyCollection.cs
index 55631057..32682f59 100644
--- a/Assets/Tests/Lua/DummyCollection.cs
+++ b/Assets/Tests/Lua/DummyCollection.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
diff --git a/Assets/Tests/Narrative/NarrativeTests.cs b/Assets/Tests/Narrative/NarrativeTests.cs
index 38f301a0..99c9fabc 100644
--- a/Assets/Tests/Narrative/NarrativeTests.cs
+++ b/Assets/Tests/Narrative/NarrativeTests.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.UI;
@@ -103,7 +101,7 @@ public class NarrativeTests : Command
// Test showing multiple characters
protected virtual void TestShow()
{
- bool found = (stage.charactersOnStage.Count == 2);
+ bool found = (stage.CharactersOnStage.Count == 2);
GameObject johnGO = stage.transform.Find("Canvas/JohnCharacter").gameObject;
GameObject sherlockGO = stage.transform.Find("Canvas/SherlockCharacter").gameObject;
@@ -116,7 +114,7 @@ public class NarrativeTests : Command
}
else
{
- Fail("Characters not found on stage" + stage.charactersOnStage.Count);
+ Fail("Characters not found on stage" + stage.CharactersOnStage.Count);
}
}
@@ -143,8 +141,8 @@ public class NarrativeTests : Command
Character johnCharacter = johnGO.GetComponent();
Character sherlockCharacter = sherlockGO.GetComponent();
- if (johnCharacter.portraitsFace == FacingDirection.Right &&
- sherlockCharacter.portraitsFace == FacingDirection.Left)
+ if (johnCharacter.PortraitsFace == FacingDirection.Right &&
+ sherlockCharacter.PortraitsFace == FacingDirection.Left)
{
Pass();
}
@@ -222,8 +220,8 @@ public class NarrativeTests : Command
protected virtual void TestResetNoDelay()
{
// Set the stage durations to 0 so we can rerun the tests in this case
- stage.fadeDuration = 0f;
- stage.moveDuration = 0f;
+ stage.FadeDuration = 0f;
+ stage.MoveDuration = 0f;
}
public override string GetSummary()
diff --git a/Assets/Tests/Narrative/NarrativeTests.unity b/Assets/Tests/Narrative/NarrativeTests.unity
index 10218686..95f4e393 100644
--- a/Assets/Tests/Narrative/NarrativeTests.unity
+++ b/Assets/Tests/Narrative/NarrativeTests.unity
@@ -117,7 +117,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3}
m_Name:
m_EditorClassIdentifier:
- selectedFlowchart: {fileID: 250457565}
+ selectedFlowchart: {fileID: 861253873}
--- !u!4 &11556238
Transform:
m_ObjectHideFlags: 1
@@ -550,7 +550,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
storyText: 'wi test{m=DoTest}{wi}
@@ -669,7 +668,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 5
- errorMessage:
indentLevel: 0
_duration:
floatRef: {fileID: 0}
@@ -715,7 +713,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 4
- errorMessage:
indentLevel: 0
targetObject: {fileID: 1066357890}
targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0,
@@ -754,7 +751,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 7
- errorMessage:
indentLevel: 0
targetObject: {fileID: 1066357890}
targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0,
@@ -781,7 +777,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 6
- errorMessage:
indentLevel: 0
_duration:
floatRef: {fileID: 0}
@@ -799,7 +794,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 9
- errorMessage:
indentLevel: 0
targetObject: {fileID: 1066357890}
targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0,
@@ -826,7 +820,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 8
- errorMessage:
indentLevel: 0
_duration:
floatRef: {fileID: 0}
@@ -844,7 +837,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 10
- errorMessage:
indentLevel: 0
storyText: Wait for click off{m=DoTest}
description:
@@ -893,7 +885,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 12
- errorMessage:
indentLevel: 0
targetObject: {fileID: 401634244}
targetComponentAssemblyName: SayTest, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
@@ -933,7 +924,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 14
- errorMessage:
indentLevel: 0
sayDialog: {fileID: 1066357895}
--- !u!1 &28716239
@@ -2690,7 +2680,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
text: Test {$StringVar}
description:
@@ -2789,7 +2778,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 2
- errorMessage:
indentLevel: 0
menuDialog: {fileID: 1393368593}
--- !u!1 &254519489
@@ -3734,7 +3722,6 @@ MonoBehaviour:
fadeDuration: 0.75
moveDuration: 1
fadeEaseType: 4
- moveEaseType: 4
shiftOffset: {x: 0, y: 0}
defaultPosition: {fileID: 254519491}
positions:
@@ -3744,7 +3731,6 @@ MonoBehaviour:
- {fileID: 1049860613}
- {fileID: 813974793}
cachedPositions: []
- charactersOnStage: []
--- !u!1 &499706539
GameObject:
m_ObjectHideFlags: 0
@@ -3946,7 +3932,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 4
- errorMessage:
indentLevel: 0
text: Option 2
description:
@@ -4012,7 +3997,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
text: Option 1
description:
@@ -4046,7 +4030,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 5
- errorMessage:
indentLevel: 0
menuDialog: {fileID: 231990862}
--- !u!114 &562609153
@@ -4127,7 +4110,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 6
- errorMessage:
indentLevel: 0
_duration:
floatRef: {fileID: 0}
@@ -4145,7 +4127,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 7
- errorMessage:
indentLevel: 0
menuDialog: {fileID: 231990862}
--- !u!1 &572306878
@@ -5060,7 +5041,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
storyText: Write a bit of text that takes a couple of seconds to write out to the
dialog.
@@ -5163,7 +5143,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 4
- errorMessage:
indentLevel: 0
_duration:
floatRef: {fileID: 0}
@@ -5193,7 +5172,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 3
- errorMessage:
indentLevel: 0
storyText: Interrupted
description:
@@ -5243,7 +5221,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 5
- errorMessage:
indentLevel: 0
sayDialog: {fileID: 1764227332}
--- !u!1 &674815458
@@ -5717,7 +5694,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
display: 1
stage: {fileID: 0}
@@ -5747,7 +5723,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 6
- errorMessage:
indentLevel: 0
--- !u!114 &711866620
MonoBehaviour:
@@ -5761,7 +5736,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 3
- errorMessage:
indentLevel: 0
display: 1
stage: {fileID: 0}
@@ -5791,7 +5765,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 5
- errorMessage:
indentLevel: 0
_duration:
floatRef: {fileID: 0}
@@ -6059,7 +6032,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
storyText: 'Play sound effect from dialog{wc}
@@ -6142,8 +6114,9 @@ MonoBehaviour:
y: -350
width: 1121
height: 870
- selectedBlock: {fileID: 0}
- selectedCommands: []
+ selectedBlock: {fileID: 736071349}
+ selectedCommands:
+ - {fileID: 736071366}
variables: []
description: 'Manual test to check if portrait images that are
@@ -6182,7 +6155,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 2
- errorMessage:
indentLevel: 0
storyText: Play voice over audio clip
description:
@@ -6208,7 +6180,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 5
- errorMessage:
indentLevel: 0
targetObject: {fileID: 1714427702}
targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0,
@@ -6235,7 +6206,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 6
- errorMessage:
indentLevel: 0
_duration:
floatRef: {fileID: 0}
@@ -6285,7 +6255,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 8
- errorMessage:
indentLevel: 0
targetObject: {fileID: 1714427702}
targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0,
@@ -6312,7 +6281,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 7
- errorMessage:
indentLevel: 0
_duration:
floatRef: {fileID: 0}
@@ -6342,7 +6310,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 3
- errorMessage:
indentLevel: 0
sayDialog: {fileID: 1714427708}
--- !u!114 &736071360
@@ -6357,7 +6324,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 9
- errorMessage:
indentLevel: 0
storyText: Test sound effect specified per character
description:
@@ -6383,7 +6349,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 11
- errorMessage:
indentLevel: 0
targetObject: {fileID: 1714427702}
targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0,
@@ -6410,7 +6375,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 10
- errorMessage:
indentLevel: 0
_duration:
floatRef: {fileID: 0}
@@ -6428,7 +6392,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 13
- errorMessage:
indentLevel: 0
targetObject: {fileID: 1714427702}
targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0,
@@ -6455,7 +6418,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 12
- errorMessage:
indentLevel: 0
_duration:
floatRef: {fileID: 0}
@@ -6473,7 +6435,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 15
- errorMessage:
indentLevel: 0
storyText: Write some audio with beep sounds
description:
@@ -6499,7 +6460,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 14
- errorMessage:
indentLevel: 0
targetObject: {fileID: 1714427702}
targetComponentAssemblyName: Fungus.WriterAudio, Assembly-CSharp, Version=0.0.0.0,
@@ -6543,7 +6503,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 17
- errorMessage:
indentLevel: 0
targetObject: {fileID: 1714427702}
targetComponentAssemblyName: Fungus.DialogInput, Assembly-CSharp, Version=0.0.0.0,
@@ -6570,7 +6529,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 16
- errorMessage:
indentLevel: 0
_duration:
floatRef: {fileID: 0}
@@ -7447,7 +7405,6 @@ MonoBehaviour:
fadeDuration: 0.75
moveDuration: 1
fadeEaseType: 4
- moveEaseType: 4
shiftOffset: {x: 0, y: 0}
defaultPosition: {fileID: 879247671}
positions:
@@ -7457,7 +7414,6 @@ MonoBehaviour:
- {fileID: 1336986580}
- {fileID: 1754947673}
cachedPositions: []
- charactersOnStage: []
--- !u!4 &825247592
Transform:
m_ObjectHideFlags: 0
@@ -7764,7 +7720,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 2
- errorMessage:
indentLevel: 0
sayDialog: {fileID: 1125936944}
--- !u!114 &861253875
@@ -7804,7 +7759,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
storyText: Write out a long piece of text that we want to interrupt before it's
finished.
@@ -7833,7 +7787,7 @@ MonoBehaviour:
parentBlock: {fileID: 861253875}
--- !u!114 &861253878
MonoBehaviour:
- m_ObjectHideFlags: 0
+ m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 861253871}
@@ -7857,7 +7811,7 @@ MonoBehaviour:
- {fileID: 861253879}
--- !u!114 &861253879
MonoBehaviour:
- m_ObjectHideFlags: 0
+ m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 861253871}
@@ -7867,7 +7821,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 7
- errorMessage:
indentLevel: 0
targetObject: {fileID: 1125936939}
targetComponentAssemblyName: Fungus.SayDialog, Assembly-CSharp, Version=0.0.0.0,
@@ -7884,7 +7837,7 @@ MonoBehaviour:
callMode: 0
--- !u!114 &861253880
MonoBehaviour:
- m_ObjectHideFlags: 0
+ m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 861253871}
@@ -7894,7 +7847,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 6
- errorMessage:
indentLevel: 0
_duration:
floatRef: {fileID: 0}
@@ -7902,7 +7854,7 @@ MonoBehaviour:
durationOLD: 0
--- !u!114 &861253881
MonoBehaviour:
- m_ObjectHideFlags: 0
+ m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 861253871}
@@ -8323,7 +8275,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 33
- errorMessage:
indentLevel: 0
targetFlowchart: {fileID: 0}
targetBlock: {fileID: 891159676}
@@ -8341,7 +8292,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 35
- errorMessage:
indentLevel: 0
testType: 6
--- !u!114 &891159648
@@ -8356,7 +8306,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 34
- errorMessage:
indentLevel: 0
targetFlowchart: {fileID: 0}
targetBlock: {fileID: 891159676}
@@ -8374,7 +8323,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 36
- errorMessage:
indentLevel: 0
storyText: Test saying something{x}
description:
@@ -8400,7 +8348,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 47
- errorMessage:
indentLevel: 0
display: 1
stage: {fileID: 0}
@@ -8432,7 +8379,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 46
- errorMessage:
indentLevel: 0
display: 2
stage: {fileID: 0}
@@ -8452,7 +8398,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 45
- errorMessage:
indentLevel: 0
display: 1
stage: {fileID: 0}
@@ -8472,7 +8417,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 44
- errorMessage:
indentLevel: 0
display: 2
stage: {fileID: 0}
@@ -8492,7 +8436,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 48
- errorMessage:
indentLevel: 0
targetFlowchart: {fileID: 0}
targetBlock: {fileID: 891159644}
@@ -8510,7 +8453,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 49
- errorMessage:
indentLevel: 0
sayDialog: {fileID: 1090798156}
--- !u!114 &891159661
@@ -8525,7 +8467,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 32
- errorMessage:
indentLevel: 0
testType: 5
--- !u!114 &891159662
@@ -8540,7 +8481,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 31
- errorMessage:
indentLevel: 0
storyText: Test saying something{x}
description:
@@ -8566,7 +8506,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 30
- errorMessage:
indentLevel: 0
testType: 4
--- !u!114 &891159664
@@ -8581,7 +8520,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 29
- errorMessage:
indentLevel: 0
display: 1
stage: {fileID: 0}
@@ -8611,7 +8549,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 28
- errorMessage:
indentLevel: 0
display: 1
stage: {fileID: 0}
@@ -8641,7 +8578,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 27
- errorMessage:
indentLevel: 0
testType: 3
--- !u!114 &891159667
@@ -8656,7 +8592,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 26
- errorMessage:
indentLevel: 0
display: 4
stage: {fileID: 0}
@@ -8686,7 +8621,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 25
- errorMessage:
indentLevel: 0
display: 1
stage: {fileID: 0}
@@ -8716,7 +8650,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 24
- errorMessage:
indentLevel: 0
testType: 2
--- !u!114 &891159670
@@ -8731,7 +8664,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 23
- errorMessage:
indentLevel: 0
display: 3
stage: {fileID: 0}
@@ -8761,7 +8693,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 22
- errorMessage:
indentLevel: 0
testType: 1
--- !u!114 &891159672
@@ -8776,7 +8707,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 21
- errorMessage:
indentLevel: 0
display: 2
stage: {fileID: 0}
@@ -8806,7 +8736,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 20
- errorMessage:
indentLevel: 0
testType: 0
--- !u!114 &891159674
@@ -8821,7 +8750,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 19
- errorMessage:
indentLevel: 0
display: 1
stage: {fileID: 0}
@@ -8851,7 +8779,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 18
- errorMessage:
indentLevel: 0
display: 1
stage: {fileID: 0}
@@ -10694,7 +10621,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
storyText: A long piece of text that takes a while to write out
description:
@@ -10798,7 +10724,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 2
- errorMessage:
indentLevel: 0
sayDialog: {fileID: 1792345322}
--- !u!1 &1083481054
@@ -11866,7 +11791,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
storyText: Block A
description:
@@ -11969,7 +11893,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 5
- errorMessage:
indentLevel: 0
storyText: Block B
description:
@@ -11995,7 +11918,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 4
- errorMessage:
indentLevel: 0
_duration:
floatRef: {fileID: 0}
@@ -12013,7 +11935,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 3
- errorMessage:
indentLevel: 0
targetFlowchart: {fileID: 0}
targetBlock: {fileID: 1196429433}
@@ -12055,7 +11976,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 6
- errorMessage:
indentLevel: 0
sayDialog: {fileID: 1242507978}
--- !u!114 &1210810389
@@ -13346,7 +13266,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 3
- errorMessage:
indentLevel: 0
--- !u!114 &1555865763
MonoBehaviour:
@@ -13383,7 +13302,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
text: DoOption
description:
@@ -15230,7 +15148,7 @@ AudioSource:
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
- m_RotationOrder: 4
+ m_RotationOrder: 0
spreadCustomCurve:
serializedVersion: 2
m_Curve:
@@ -15252,7 +15170,7 @@ AudioSource:
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
- m_RotationOrder: 4
+ m_RotationOrder: 0
--- !u!114 &1714427706
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -16411,7 +16329,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 4
- errorMessage:
indentLevel: 0
--- !u!114 &1807695775
MonoBehaviour:
@@ -16426,7 +16343,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 3
- errorMessage:
indentLevel: 0
storyText: '{s=40}
@@ -16463,7 +16379,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
storyText: '{s=40}
@@ -16578,7 +16493,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 5
- errorMessage:
indentLevel: 0
sayDialog: {fileID: 927439921}
--- !u!1 &1837434062
@@ -16818,7 +16732,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
storyText: A long block of text that runs all the way to the end of the text box{w=1}{x}
description:
@@ -16889,7 +16802,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 2
- errorMessage:
indentLevel: 0
sayDialog: {fileID: 1508308453}
--- !u!114 &1913435025
@@ -16904,7 +16816,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 4
- errorMessage:
indentLevel: 0
storyText: A long block of text that runs all the way to the end of the text box{w=1}{x}
description:
@@ -16930,7 +16841,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 3
- errorMessage:
indentLevel: 0
sayDialog: {fileID: 538232720}
--- !u!114 &1913435027
@@ -16945,7 +16855,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 5
- errorMessage:
indentLevel: 0
storyText: No character. A long block of text that runs all the way to the end of
the text box{w=1}{x}
@@ -16972,7 +16881,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 6
- errorMessage:
indentLevel: 0
storyText: No character. A long block of text that runs all the way to the end of
the text box{w=1}{x}
@@ -16999,7 +16907,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 10
- errorMessage:
indentLevel: 0
targetObject: {fileID: 392887984}
targetComponentAssemblyName: OverlapTests, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
@@ -17026,7 +16933,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 9
- errorMessage:
indentLevel: 0
targetObject: {fileID: 392887984}
targetComponentAssemblyName: OverlapTests, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
@@ -17053,7 +16959,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 8
- errorMessage:
indentLevel: 0
targetObject: {fileID: 392887984}
targetComponentAssemblyName: OverlapTests, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
@@ -17080,7 +16985,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 7
- errorMessage:
indentLevel: 0
targetObject: {fileID: 392887984}
targetComponentAssemblyName: OverlapTests, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
@@ -17161,7 +17065,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
go: {fileID: 1125936939}
- thisPropertyPath: Writer.isWriting
+ thisPropertyPath: Writer.IsWriting
compareToType: 1
other: {fileID: 0}
otherPropertyPath:
@@ -17576,7 +17480,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
textObject: {fileID: 588326334}
text:
@@ -18326,7 +18229,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
display: 1
stage: {fileID: 0}
@@ -18399,7 +18301,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 2
- errorMessage:
indentLevel: 0
display: 1
stage: {fileID: 0}
@@ -18429,7 +18330,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 3
- errorMessage:
indentLevel: 0
_duration:
floatRef: {fileID: 0}
@@ -18447,7 +18347,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 5
- errorMessage:
indentLevel: 0
display: 1
stage: {fileID: 0}
@@ -18477,7 +18376,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 4
- errorMessage:
indentLevel: 0
_duration:
floatRef: {fileID: 0}
@@ -18495,7 +18393,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 6
- errorMessage:
indentLevel: 0
--- !u!114 &2043226680
MonoBehaviour:
@@ -18509,7 +18406,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 7
- errorMessage:
indentLevel: 0
_duration:
floatRef: {fileID: 0}
diff --git a/Assets/Tests/Narrative/OverlapTests.cs b/Assets/Tests/Narrative/OverlapTests.cs
index 62b330bd..e9b318d6 100644
--- a/Assets/Tests/Narrative/OverlapTests.cs
+++ b/Assets/Tests/Narrative/OverlapTests.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
@@ -14,12 +12,12 @@ public class OverlapTests : MonoBehaviour
public void Step1()
{
- if (!sayDialog_RightImage.characterImage.IsActive())
+ if (!sayDialog_RightImage.CharacterImage.IsActive())
{
IntegrationTest.Fail("Character image not active");
}
- if (sayDialog_RightImage.characterImage.transform.position.x < sayDialog_RightImage.storyText.transform.position.x)
+ if (sayDialog_RightImage.CharacterImage.transform.position.x < sayDialog_RightImage.StoryText.transform.position.x)
{
IntegrationTest.Fail("Character image not on right hand side");
}
@@ -27,12 +25,12 @@ public class OverlapTests : MonoBehaviour
public void Step2()
{
- if (sayDialog_RightImage.characterImage.IsActive())
+ if (sayDialog_RightImage.CharacterImage.IsActive())
{
IntegrationTest.Fail("Character image should not be active");
}
- float width = sayDialog_RightImage.storyText.rectTransform.rect.width;
+ float width = sayDialog_RightImage.StoryText.rectTransform.rect.width;
if (!Mathf.Approximately(width, 1439))
{
IntegrationTest.Fail("Story text width not correct");
@@ -41,12 +39,12 @@ public class OverlapTests : MonoBehaviour
public void Step3()
{
- if (!sayDialog_LeftImage.characterImage.IsActive())
+ if (!sayDialog_LeftImage.CharacterImage.IsActive())
{
IntegrationTest.Fail("Character image not active");
}
- if (sayDialog_LeftImage.characterImage.transform.position.x > sayDialog_LeftImage.storyText.transform.position.x)
+ if (sayDialog_LeftImage.CharacterImage.transform.position.x > sayDialog_LeftImage.StoryText.transform.position.x)
{
IntegrationTest.Fail("Character image not on left hand side");
}
@@ -54,12 +52,12 @@ public class OverlapTests : MonoBehaviour
public void Step4()
{
- if (sayDialog_LeftImage.characterImage.IsActive())
+ if (sayDialog_LeftImage.CharacterImage.IsActive())
{
IntegrationTest.Fail("Character image should not be active");
}
- float width = sayDialog_LeftImage.storyText.rectTransform.rect.width;
+ float width = sayDialog_LeftImage.StoryText.rectTransform.rect.width;
if (!Mathf.Approximately(width, 1439))
{
IntegrationTest.Fail("Story text width not correct");
diff --git a/Assets/Tests/Narrative/PortraitFlipTest.cs b/Assets/Tests/Narrative/PortraitFlipTest.cs
index b86d9227..6bab3969 100644
--- a/Assets/Tests/Narrative/PortraitFlipTest.cs
+++ b/Assets/Tests/Narrative/PortraitFlipTest.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
diff --git a/Assets/Tests/Narrative/SayTest.cs b/Assets/Tests/Narrative/SayTest.cs
index e9b38231..5ab9492b 100644
--- a/Assets/Tests/Narrative/SayTest.cs
+++ b/Assets/Tests/Narrative/SayTest.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
diff --git a/Assets/Tests/Scripting/TestInvoke.cs b/Assets/Tests/Scripting/TestInvoke.cs
index 4ce85601..aa276cf3 100644
--- a/Assets/Tests/Scripting/TestInvoke.cs
+++ b/Assets/Tests/Scripting/TestInvoke.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
@@ -100,10 +98,10 @@ namespace Fungus
}
// Check Fungus variables are populated with expected values
- if (flowchart.GetVariable("BoolVar").value != true ||
- flowchart.GetVariable("IntVar").value != 5 ||
- flowchart.GetVariable("FloatVar").value != 22.1f ||
- flowchart.GetVariable("StringVar").value != "a string")
+ if (flowchart.GetVariable("BoolVar").Value != true ||
+ flowchart.GetVariable("IntVar").Value != 5 ||
+ flowchart.GetVariable("FloatVar").Value != 22.1f ||
+ flowchart.GetVariable("StringVar").Value != "a string")
{
IntegrationTest.Fail("Fungus variables do not match expected values");
return;
diff --git a/Assets/Tests/Scripting/WaitInput.cs b/Assets/Tests/Scripting/WaitInput.cs
index 7a7670c2..85816a4f 100644
--- a/Assets/Tests/Scripting/WaitInput.cs
+++ b/Assets/Tests/Scripting/WaitInput.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
diff --git a/Assets/Tests/Sprite/SpriteTests.unity b/Assets/Tests/Sprite/SpriteTests.unity
index 5b99a06b..c5e04a2c 100644
--- a/Assets/Tests/Sprite/SpriteTests.unity
+++ b/Assets/Tests/Sprite/SpriteTests.unity
@@ -13,7 +13,7 @@ SceneSettings:
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
- serializedVersion: 6
+ serializedVersion: 7
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
@@ -37,12 +37,12 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
+ m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
- serializedVersion: 6
+ serializedVersion: 7
m_GIWorkflowMode: 1
- m_LightmapsMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
@@ -53,17 +53,22 @@ LightmapSettings:
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
- serializedVersion: 3
+ serializedVersion: 4
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
+ m_AO: 0
m_AOMaxDistance: 1
- m_Padding: 2
m_CompAOExponent: 0
+ m_CompAOExponentDirect: 0
+ m_Padding: 2
m_LightmapParameters: {fileID: 0}
+ m_LightmapsBakeMode: 1
m_TextureCompression: 1
+ m_DirectLightInLightProbes: 1
m_FinalGather: 0
+ m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_LightingDataAsset: {fileID: 0}
@@ -110,6 +115,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1870691788}
m_RootOrder: 0
@@ -122,17 +128,20 @@ SpriteRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
+ m_MotionVectors: 1
+ m_LightProbeUsage: 0
+ m_ReflectionProbeUsage: 0
m_Materials:
- - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
- m_UseLightProbes: 0
- m_ReflectionProbeUsage: 0
m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
+ m_SelectedWireframeHidden: 1
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
@@ -202,6 +211,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -8.12, y: -1.52, z: 0}
m_LocalScale: {x: 1.8661932, y: 1.8661932, z: 1.8661932}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1918523911}
m_RootOrder: 2
@@ -214,17 +224,20 @@ SpriteRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
+ m_MotionVectors: 1
+ m_LightProbeUsage: 0
+ m_ReflectionProbeUsage: 0
m_Materials:
- - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
- m_UseLightProbes: 0
- m_ReflectionProbeUsage: 0
m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
+ m_SelectedWireframeHidden: 1
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
@@ -260,17 +273,20 @@ SpriteRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
+ m_MotionVectors: 1
+ m_LightProbeUsage: 0
+ m_ReflectionProbeUsage: 0
m_Materials:
- - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
- m_UseLightProbes: 0
- m_ReflectionProbeUsage: 0
m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
+ m_SelectedWireframeHidden: 1
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
@@ -290,6 +306,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.09, y: 0.15, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1440381098}
m_RootOrder: 0
@@ -319,6 +336,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1440381098}
m_RootOrder: 3
@@ -392,6 +410,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1892781631}
m_RootOrder: 1
@@ -444,7 +463,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
- version: 1.0
+ version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
@@ -456,8 +475,9 @@ MonoBehaviour:
y: -340
width: 1114
height: 859
- selectedBlock: {fileID: 0}
- selectedCommands: []
+ selectedBlock: {fileID: 625047150}
+ selectedCommands:
+ - {fileID: 625047152}
variables: []
description: Test if the SetDraggable command sets the Drag Enabled property
stepPause: 0
@@ -465,7 +485,10 @@ MonoBehaviour:
hideComponents: 1
saveSelection: 1
localizationId:
+ showLineNumbers: 0
hideCommands: []
+ luaEnvironment: {fileID: 0}
+ luaBindingName: flowchart
--- !u!114 &625047152
MonoBehaviour:
m_ObjectHideFlags: 2
@@ -478,7 +501,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
targetDraggable2D: {fileID: 1178281937}
activeState:
@@ -512,6 +534,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 744934491}
m_RootOrder: 0
@@ -564,7 +587,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
- version: 1.0
+ version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
@@ -586,7 +609,10 @@ MonoBehaviour:
hideComponents: 1
saveSelection: 1
localizationId:
+ showLineNumbers: 0
hideCommands: []
+ luaEnvironment: {fileID: 0}
+ luaBindingName: flowchart
--- !u!114 &647587215
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -599,11 +625,13 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
spriteRenderer: {fileID: 1870691789}
- visible: 0
+ _visible:
+ booleanRef: {fileID: 0}
+ booleanVal: 0
affectChildren: 1
+ visibleOLD: 0
--- !u!1 &690569142
GameObject:
m_ObjectHideFlags: 0
@@ -629,6 +657,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -5.88, y: 0.27, z: 0}
m_LocalScale: {x: 1.8661932, y: 1.8661932, z: 1.8661932}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1918523911}
m_RootOrder: 1
@@ -641,17 +670,20 @@ SpriteRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
+ m_MotionVectors: 1
+ m_LightProbeUsage: 0
+ m_ReflectionProbeUsage: 0
m_Materials:
- - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
- m_UseLightProbes: 0
- m_ReflectionProbeUsage: 0
m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
+ m_SelectedWireframeHidden: 1
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
@@ -674,7 +706,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
go: {fileID: 1178281935}
- thisPropertyPath: Draggable2D.dragEnabled
+ thisPropertyPath: Draggable2D.DragEnabled
compareToType: 1
other: {fileID: 0}
otherPropertyPath:
@@ -725,6 +757,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 647587211}
- {fileID: 1870691788}
@@ -817,6 +850,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
@@ -848,6 +882,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1892781631}
m_RootOrder: 0
@@ -868,6 +903,7 @@ MonoBehaviour:
returnOnCompleted: 1
returnDuration: 1
hoverCursor: {fileID: 0}
+ useEventSystem: 0
--- !u!50 &1178281938
Rigidbody2D:
serializedVersion: 2
@@ -911,17 +947,20 @@ SpriteRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
+ m_MotionVectors: 1
+ m_LightProbeUsage: 0
+ m_ReflectionProbeUsage: 0
m_Materials:
- - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
- m_UseLightProbes: 0
- m_ReflectionProbeUsage: 0
m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
+ m_SelectedWireframeHidden: 1
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
@@ -957,6 +996,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.13777122, y: -0.16843766, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1918523911}
m_RootOrder: 4
@@ -1019,17 +1059,20 @@ SpriteRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
+ m_MotionVectors: 1
+ m_LightProbeUsage: 0
+ m_ReflectionProbeUsage: 0
m_Materials:
- - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
- m_UseLightProbes: 0
- m_ReflectionProbeUsage: 0
m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
+ m_SelectedWireframeHidden: 1
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
@@ -1049,6 +1092,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.76, y: -1.57, z: 0}
m_LocalScale: {x: 1.8661932, y: 1.8661932, z: 1.8661932}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1918523911}
m_RootOrder: 3
@@ -1077,6 +1121,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 374044766}
- {fileID: 2027733279}
@@ -1130,6 +1175,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1892781631}
m_RootOrder: 2
@@ -1257,6 +1303,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@@ -1289,6 +1336,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1918523911}
m_RootOrder: 0
@@ -1304,7 +1352,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
- version: 1.0
+ version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
@@ -1325,7 +1373,10 @@ MonoBehaviour:
hideComponents: 1
saveSelection: 1
localizationId:
+ showLineNumbers: 0
hideCommands: []
+ luaEnvironment: {fileID: 0}
+ luaBindingName: flowchart
--- !u!114 &1766220888
MonoBehaviour:
m_ObjectHideFlags: 2
@@ -1338,7 +1389,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
targetSprites:
- {fileID: 166866516}
@@ -1398,7 +1448,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 2
- errorMessage:
indentLevel: 0
targetObject: {fileID: 1307141168}
targetComponentAssemblyName: Fungus.SpritesTest, Assembly-CSharp, Version=0.0.0.0,
@@ -1438,6 +1487,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 666171}
m_Father: {fileID: 744934491}
@@ -1451,17 +1501,20 @@ SpriteRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
+ m_MotionVectors: 1
+ m_LightProbeUsage: 0
+ m_ReflectionProbeUsage: 0
m_Materials:
- - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
- m_UseLightProbes: 0
- m_ReflectionProbeUsage: 0
m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
+ m_SelectedWireframeHidden: 1
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
@@ -1487,7 +1540,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
- m_IsActive: 1
+ m_IsActive: 0
--- !u!114 &1892781630
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1518,6 +1571,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1178281936}
- {fileID: 625047148}
@@ -1561,6 +1615,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
@@ -1589,6 +1644,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1766220886}
- {fileID: 690569143}
@@ -1643,6 +1699,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 744934491}
m_RootOrder: 2
@@ -1692,6 +1749,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1.4, y: -0.43, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1440381098}
m_RootOrder: 1
@@ -1704,17 +1762,20 @@ SpriteRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
+ m_MotionVectors: 1
+ m_LightProbeUsage: 0
+ m_ReflectionProbeUsage: 0
m_Materials:
- - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0}
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
- m_UseLightProbes: 0
- m_ReflectionProbeUsage: 0
m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
+ m_SelectedWireframeHidden: 1
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
@@ -1762,6 +1823,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
@@ -1794,6 +1856,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1440381098}
m_RootOrder: 2
@@ -1809,7 +1872,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 2
- errorMessage:
indentLevel: 0
targetObject: {fileID: 2027733278}
sortingLayer: Top
@@ -1825,7 +1887,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
targetObject: {fileID: 374044764}
sortingLayer: Top
@@ -1878,7 +1939,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
- version: 1.0
+ version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
@@ -1900,4 +1961,7 @@ MonoBehaviour:
hideComponents: 1
saveSelection: 1
localizationId:
+ showLineNumbers: 0
hideCommands: []
+ luaEnvironment: {fileID: 0}
+ luaBindingName: flowchart
diff --git a/Assets/Tests/Sprite/SpritesTest.cs b/Assets/Tests/Sprite/SpritesTest.cs
index ecb51bd6..5e97dede 100644
--- a/Assets/Tests/Sprite/SpritesTest.cs
+++ b/Assets/Tests/Sprite/SpritesTest.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
diff --git a/Assets/Tests/UI/DummyText.cs b/Assets/Tests/UI/DummyText.cs
index fb2c5477..db0ae938 100644
--- a/Assets/Tests/UI/DummyText.cs
+++ b/Assets/Tests/UI/DummyText.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
diff --git a/Assets/Tests/UI/Editor/TextTagParserTests.cs b/Assets/Tests/UI/Editor/TextTagParserTests.cs
index 4a290d46..249d0620 100644
--- a/Assets/Tests/UI/Editor/TextTagParserTests.cs
+++ b/Assets/Tests/UI/Editor/TextTagParserTests.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using System;
using System.Collections.Generic;
diff --git a/Assets/Tests/UI/FakeButtonClick.cs b/Assets/Tests/UI/FakeButtonClick.cs
index e7f49e28..e52dbaad 100644
--- a/Assets/Tests/UI/FakeButtonClick.cs
+++ b/Assets/Tests/UI/FakeButtonClick.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using UnityEngine.UI;
diff --git a/Assets/Tests/UI/FakeWriterInput.cs b/Assets/Tests/UI/FakeWriterInput.cs
index 3d9d2579..f1e23c86 100644
--- a/Assets/Tests/UI/FakeWriterInput.cs
+++ b/Assets/Tests/UI/FakeWriterInput.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
diff --git a/Assets/Tests/UI/TestFlags.cs b/Assets/Tests/UI/TestFlags.cs
index 7193c190..79140c58 100644
--- a/Assets/Tests/UI/TestFlags.cs
+++ b/Assets/Tests/UI/TestFlags.cs
@@ -1,7 +1,5 @@
-/**
- * This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
- * It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
- */
+// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
+// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
diff --git a/Assets/Tests/UI/TextTests.unity b/Assets/Tests/UI/TextTests.unity
index 2f3bcef8..66577683 100644
--- a/Assets/Tests/UI/TextTests.unity
+++ b/Assets/Tests/UI/TextTests.unity
@@ -13,7 +13,7 @@ SceneSettings:
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
- serializedVersion: 6
+ serializedVersion: 7
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
@@ -37,12 +37,12 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
+ m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
- serializedVersion: 6
+ serializedVersion: 7
m_GIWorkflowMode: 1
- m_LightmapsMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
@@ -53,17 +53,22 @@ LightmapSettings:
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
- serializedVersion: 3
+ serializedVersion: 4
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
+ m_AO: 0
m_AOMaxDistance: 1
- m_Padding: 2
m_CompAOExponent: 0
+ m_CompAOExponentDirect: 0
+ m_Padding: 2
m_LightmapParameters: {fileID: 0}
+ m_LightmapsBakeMode: 1
m_TextureCompression: 1
+ m_DirectLightInLightProbes: 1
m_FinalGather: 0
+ m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_LightingDataAsset: {fileID: 0}
@@ -111,6 +116,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1912867844}
m_RootOrder: 1
@@ -170,7 +176,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
go: {fileID: 1845987937}
- thisPropertyPath: StringVariable.value
+ thisPropertyPath: StringVariable.Value
compareToType: 1
other: {fileID: 0}
otherPropertyPath:
@@ -225,6 +231,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 673069186}
m_Father: {fileID: 1108190806}
@@ -286,6 +293,7 @@ Canvas:
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
+ m_SortingBucketNormalizedSize: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
@@ -326,6 +334,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
@@ -376,17 +385,20 @@ MeshRenderer:
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
+ m_MotionVectors: 1
+ m_LightProbeUsage: 1
+ m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
- m_UseLightProbes: 1
- m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
+ m_SelectedWireframeHidden: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
@@ -402,6 +414,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -430, y: -223.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1032150759}
m_RootOrder: 1
@@ -434,6 +447,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1730131643}
m_RootOrder: 2
@@ -496,6 +510,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 30
punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
@@ -568,6 +583,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 814315340}
- {fileID: 1783342058}
@@ -630,6 +646,7 @@ Canvas:
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
+ m_SortingBucketNormalizedSize: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
@@ -679,6 +696,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1730131643}
- {fileID: 945055422}
@@ -739,6 +757,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 530636036}
m_RootOrder: 0
@@ -754,7 +773,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
- version: 1.0
+ version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
@@ -776,7 +795,10 @@ MonoBehaviour:
hideComponents: 1
saveSelection: 1
localizationId:
+ showLineNumbers: 0
hideCommands: []
+ luaEnvironment: {fileID: 0}
+ luaBindingName: flowchart
--- !u!114 &332004787
MonoBehaviour:
m_ObjectHideFlags: 2
@@ -789,7 +811,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
textObject: {fileID: 1490749230}
text:
@@ -856,7 +877,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 3
- errorMessage:
indentLevel: 0
textObject: {fileID: 1490749230}
text:
@@ -884,7 +904,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 2
- errorMessage:
indentLevel: 0
targetObject: {fileID: 1490749230}
targetComponentAssemblyName: Fungus.WriterAudio, Assembly-CSharp, Version=0.0.0.0,
@@ -928,9 +947,11 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 4
- errorMessage:
indentLevel: 0
- duration: 2
+ _duration:
+ floatRef: {fileID: 0}
+ floatVal: 1
+ durationOLD: 2
--- !u!1 &352621261
GameObject:
m_ObjectHideFlags: 0
@@ -958,6 +979,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 2052799376}
m_Father: {fileID: 717214672}
@@ -1019,6 +1041,7 @@ Canvas:
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
+ m_SortingBucketNormalizedSize: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
@@ -1047,6 +1070,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1966871422}
- {fileID: 770681021}
@@ -1120,6 +1144,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1619905204}
- {fileID: 954527802}
@@ -1190,6 +1215,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 507643414}
m_RootOrder: 0
@@ -1283,6 +1309,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 10
punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
@@ -1337,6 +1364,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1730131643}
m_RootOrder: 15
@@ -1374,6 +1402,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1730131643}
m_RootOrder: 7
@@ -1415,6 +1444,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 30
punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
@@ -1505,6 +1535,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 493382917}
m_Father: {fileID: 732059695}
@@ -1580,6 +1611,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 332004785}
- {fileID: 1411617024}
@@ -1612,6 +1644,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 732059695}
m_RootOrder: 0
@@ -1718,6 +1751,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1112601923}
m_RootOrder: 1
@@ -1793,6 +1827,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 78431861}
m_RootOrder: 0
@@ -1826,6 +1861,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1106313372}
- {fileID: 773300315}
@@ -1878,6 +1914,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 626950207}
- {fileID: 1290158568}
@@ -1985,6 +2022,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1730131643}
m_RootOrder: 5
@@ -2026,6 +2064,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 30
punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
@@ -2098,6 +2137,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 732059695}
m_Father: {fileID: 394147078}
@@ -2159,6 +2199,7 @@ Canvas:
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
+ m_SortingBucketNormalizedSize: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
@@ -2188,6 +2229,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -7.82, y: -1.02, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1732768666}
m_RootOrder: 2
@@ -2221,17 +2263,20 @@ MeshRenderer:
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
+ m_MotionVectors: 1
+ m_LightProbeUsage: 1
+ m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
- m_UseLightProbes: 1
- m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
+ m_SelectedWireframeHidden: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
@@ -2263,6 +2308,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 717214672}
m_RootOrder: 1
@@ -2330,6 +2376,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 234842813}
m_RootOrder: 0
@@ -2423,6 +2470,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1912867844}
m_RootOrder: 0
@@ -2518,6 +2566,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1730131643}
m_RootOrder: 4
@@ -2559,6 +2608,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 30
punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
@@ -2630,6 +2680,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1783342058}
m_RootOrder: 0
@@ -2702,6 +2753,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 245735760}
m_RootOrder: 3
@@ -2717,6 +2769,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 60
punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
@@ -2748,6 +2801,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 574, y: 136.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 245735760}
m_RootOrder: 1
@@ -2850,6 +2904,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 394147078}
m_RootOrder: 2
@@ -2919,6 +2974,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 396899564}
m_RootOrder: 1
@@ -2934,7 +2990,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
textObject: {fileID: 1619905202}
text:
@@ -2999,7 +3054,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
- version: 1.0
+ version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
@@ -3022,7 +3077,10 @@ MonoBehaviour:
hideComponents: 1
saveSelection: 1
localizationId:
+ showLineNumbers: 0
hideCommands: []
+ luaEnvironment: {fileID: 0}
+ luaBindingName: flowchart
--- !u!1 &957032111
GameObject:
m_ObjectHideFlags: 0
@@ -3051,6 +3109,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1108190806}
m_RootOrder: 2
@@ -3066,7 +3125,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
targetObjects:
- {fileID: 673069183}
@@ -3132,7 +3190,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
- version: 1.0
+ version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
@@ -3154,7 +3212,10 @@ MonoBehaviour:
hideComponents: 1
saveSelection: 1
localizationId:
+ showLineNumbers: 0
hideCommands: []
+ luaEnvironment: {fileID: 0}
+ luaBindingName: flowchart
--- !u!1 &988367244
GameObject:
m_ObjectHideFlags: 0
@@ -3183,6 +3244,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1730131643}
m_RootOrder: 14
@@ -3203,6 +3265,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 30
punctuationPause: 0.25
hiddenTextColor: {r: 0.5008113, g: 0.21323532, b: 1, a: 1}
@@ -3321,6 +3384,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -128.5, y: 1, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 245735760}
m_RootOrder: 5
@@ -3336,7 +3400,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
- version: 1.0
+ version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
@@ -3361,7 +3425,10 @@ MonoBehaviour:
hideComponents: 1
saveSelection: 1
localizationId:
+ showLineNumbers: 0
hideCommands: []
+ luaEnvironment: {fileID: 0}
+ luaBindingName: flowchart
--- !u!114 &1017201040
MonoBehaviour:
m_ObjectHideFlags: 2
@@ -3411,7 +3478,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 17
- errorMessage:
indentLevel: 0
textObject: {fileID: 1405192199}
text:
@@ -3479,7 +3545,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 4
- errorMessage:
indentLevel: 0
textObject: {fileID: 1651293173}
text:
@@ -3521,7 +3586,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 5
- errorMessage:
indentLevel: 0
textObject: {fileID: 1121374950}
text:
@@ -3555,7 +3619,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 12
- errorMessage:
indentLevel: 0
textObject: {fileID: 1754111083}
text:
@@ -3583,7 +3646,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 14
- errorMessage:
indentLevel: 0
delay: 0
invokeType: 0
@@ -3658,7 +3720,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 10
- errorMessage:
indentLevel: 0
textObject: {fileID: 1920590680}
text:
@@ -3686,7 +3747,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 9
- errorMessage:
indentLevel: 0
textObject: {fileID: 750279026}
text:
@@ -3714,7 +3774,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 8
- errorMessage:
indentLevel: 0
textObject: {fileID: 899652408}
text:
@@ -3742,7 +3801,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 7
- errorMessage:
indentLevel: 0
textObject: {fileID: 1218238772}
text:
@@ -3770,7 +3828,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 6
- errorMessage:
indentLevel: 0
textObject: {fileID: 185519269}
text:
@@ -3798,7 +3855,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 13
- errorMessage:
indentLevel: 0
textObject: {fileID: 501693565}
text:
@@ -3827,7 +3883,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 15
- errorMessage:
indentLevel: 0
delay: 0
invokeType: 0
@@ -3891,7 +3946,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 16
- errorMessage:
indentLevel: 0
textObject: {fileID: 1476144413}
text:
@@ -3919,7 +3973,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 18
- errorMessage:
indentLevel: 0
textObject: {fileID: 1614606397}
text:
@@ -3947,7 +4000,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 19
- errorMessage:
indentLevel: 0
textObject: {fileID: 2015818680}
text:
@@ -3975,7 +4027,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 20
- errorMessage:
indentLevel: 0
textObject: {fileID: 2004095628}
text:
@@ -4003,7 +4054,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 21
- errorMessage:
indentLevel: 0
textObject: {fileID: 1719294948}
text:
@@ -4031,7 +4081,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 22
- errorMessage:
indentLevel: 0
textObject: {fileID: 497932656}
text:
@@ -4115,7 +4164,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 23
- errorMessage:
indentLevel: 0
textObject: {fileID: 988367244}
text:
@@ -4177,6 +4225,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1518184826}
- {fileID: 95196515}
@@ -4209,6 +4258,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 430, y: 223.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 245735760}
m_RootOrder: 4
@@ -4249,6 +4299,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1.3, y: 3.2525635, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1732768666}
m_RootOrder: 3
@@ -4319,6 +4370,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 80, y: 15, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1108190806}
m_RootOrder: 0
@@ -4374,7 +4426,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
- version: 1.0
+ version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
@@ -4396,7 +4448,10 @@ MonoBehaviour:
hideComponents: 1
saveSelection: 1
localizationId:
+ showLineNumbers: 0
hideCommands: []
+ luaEnvironment: {fileID: 0}
+ luaBindingName: flowchart
--- !u!114 &1106313369
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -4409,7 +4464,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
targetObjects:
- {fileID: 2052799372}
@@ -4462,6 +4516,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 717214672}
m_RootOrder: 0
@@ -4480,7 +4535,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
- m_IsActive: 1
+ m_IsActive: 0
--- !u!114 &1108190805
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -4511,6 +4566,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1096607115}
- {fileID: 78431861}
@@ -4544,6 +4600,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1595694582}
- {fileID: 640528467}
@@ -4704,6 +4761,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 30
punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
@@ -4758,6 +4816,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1730131643}
m_RootOrder: 1
@@ -4816,6 +4875,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1783342058}
m_RootOrder: 1
@@ -4905,6 +4965,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 530636036}
m_RootOrder: 2
@@ -4958,6 +5019,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1730131643}
m_RootOrder: 3
@@ -5020,6 +5082,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 30
punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
@@ -5109,6 +5172,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1301448259}
m_Father: {fileID: 732059695}
@@ -5144,6 +5208,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1290158568}
m_RootOrder: 0
@@ -5222,6 +5287,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@@ -5252,6 +5318,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1730131643}
m_RootOrder: 8
@@ -5347,6 +5414,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1490749231}
m_Father: {fileID: 530636036}
@@ -5408,6 +5476,7 @@ Canvas:
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
+ m_SortingBucketNormalizedSize: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
@@ -5461,6 +5530,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1732768666}
m_RootOrder: 0
@@ -5476,7 +5546,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
- version: 1.0
+ version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
@@ -5499,7 +5569,10 @@ MonoBehaviour:
hideComponents: 1
saveSelection: 1
localizationId:
+ showLineNumbers: 0
hideCommands: []
+ luaEnvironment: {fileID: 0}
+ luaBindingName: flowchart
--- !u!114 &1434227627
MonoBehaviour:
m_ObjectHideFlags: 2
@@ -5512,7 +5585,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
textObject: {fileID: 814315339}
text:
@@ -5578,7 +5650,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 2
- errorMessage:
indentLevel: 0
textObject: {fileID: 1783342057}
text:
@@ -5606,7 +5677,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 3
- errorMessage:
indentLevel: 0
textObject: {fileID: 770976494}
text:
@@ -5650,6 +5720,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 195.19339, y: 518.4596, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1032150759}
m_RootOrder: 2
@@ -5837,6 +5908,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
@@ -5870,6 +5942,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 30
punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
@@ -5924,6 +5997,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1730131643}
m_RootOrder: 9
@@ -5961,6 +6035,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1411617024}
m_RootOrder: 0
@@ -6020,6 +6095,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 60
punctuationPause: 0.25
hiddenTextColor: {r: 0.46323532, g: 0.46323532, b: 0.46323532, a: 1}
@@ -6190,6 +6266,7 @@ Canvas:
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
+ m_SortingBucketNormalizedSize: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
@@ -6202,6 +6279,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1612264387}
- {fileID: 1912867844}
@@ -6239,6 +6317,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1112601923}
m_RootOrder: 0
@@ -6312,6 +6391,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1518184826}
m_RootOrder: 0
@@ -6386,6 +6466,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1730131643}
m_RootOrder: 10
@@ -6406,6 +6487,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 30
punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
@@ -6487,6 +6569,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 396899564}
m_RootOrder: 0
@@ -6516,6 +6599,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 2052799376}
m_RootOrder: 0
@@ -6591,6 +6675,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1730131643}
m_RootOrder: 0
@@ -6650,6 +6735,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 30
punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
@@ -6748,6 +6834,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
@@ -6795,6 +6882,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1730131643}
m_RootOrder: 13
@@ -6815,6 +6903,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 30
punctuationPause: 0.25
hiddenTextColor: {r: 0.5008113, g: 0.21323532, b: 1, a: 1}
@@ -6930,6 +7019,7 @@ Canvas:
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
+ m_SortingBucketNormalizedSize: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
@@ -6942,6 +7032,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1651293174}
- {fileID: 1121374955}
@@ -7012,6 +7103,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1434227625}
- {fileID: 234842813}
@@ -7090,17 +7182,20 @@ MeshRenderer:
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
+ m_MotionVectors: 1
+ m_LightProbeUsage: 1
+ m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
- m_UseLightProbes: 1
- m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
+ m_SelectedWireframeHidden: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
@@ -7116,6 +7211,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.51, y: -1.71, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 245735760}
m_RootOrder: 2
@@ -7131,6 +7227,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 60
punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
@@ -7164,6 +7261,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 911858106}
- {fileID: 1121990698}
@@ -7345,7 +7443,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
- version: 1.0
+ version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
@@ -7367,7 +7465,10 @@ MonoBehaviour:
hideComponents: 0
saveSelection: 1
localizationId:
+ showLineNumbers: 0
hideCommands: []
+ luaEnvironment: {fileID: 0}
+ luaBindingName: flowchart
--- !u!4 &1845987942
Transform:
m_ObjectHideFlags: 0
@@ -7377,6 +7478,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1032150759}
m_RootOrder: 3
@@ -7406,7 +7508,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 4
- errorMessage:
indentLevel: 0
targetTextObject: {fileID: 1112601922}
stringVariable: {fileID: 1845987944}
@@ -7423,7 +7524,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 3
- errorMessage:
indentLevel: 0
targetTextObject: {fileID: 95196512}
text:
@@ -7443,7 +7543,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 2
- errorMessage:
indentLevel: 0
targetTextObject: {fileID: 1912867843}
text:
@@ -7463,7 +7562,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
targetTextObject: {fileID: 1612264386}
text:
@@ -7532,6 +7630,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 872356302}
- {fileID: 34230113}
@@ -7686,6 +7785,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1730131643}
m_RootOrder: 6
@@ -7727,6 +7827,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 30
punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
@@ -7817,6 +7918,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 394147078}
m_RootOrder: 0
@@ -7832,7 +7934,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3}
m_Name:
m_EditorClassIdentifier:
- version: 1.0
+ version: 1
scrollPos: {x: 0, y: 0}
variablesScrollPos: {x: 0, y: 0}
variablesExpanded: 1
@@ -7854,7 +7956,10 @@ MonoBehaviour:
hideComponents: 1
saveSelection: 1
localizationId:
+ showLineNumbers: 0
hideCommands: []
+ luaEnvironment: {fileID: 0}
+ luaBindingName: flowchart
--- !u!114 &1966871424
MonoBehaviour:
m_ObjectHideFlags: 2
@@ -7904,7 +8009,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemId: 1
- errorMessage:
indentLevel: 0
slider: {fileID: 732059696}
value:
@@ -7957,6 +8061,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1730131643}
m_RootOrder: 12
@@ -7977,6 +8082,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 30
punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
@@ -8049,6 +8155,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 1730131643}
m_RootOrder: 11
@@ -8069,6 +8176,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetTextObject: {fileID: 0}
+ punchObject: {fileID: 0}
writingSpeed: 30
punctuationPause: 0.25
hiddenTextColor: {r: 1, g: 1, b: 1, a: 0}
@@ -8235,6 +8343,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1649786891}
m_Father: {fileID: 352621262}
diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/DTOFormatter.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/DTOFormatter.cs
index f974b7c1..1d084728 100644
--- a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/DTOFormatter.cs
+++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/DTOFormatter.cs
@@ -136,5 +136,4 @@ namespace UnityTest
return result;
}
}
-
}
\ No newline at end of file
diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsHierarchyAnnotation.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsHierarchyAnnotation.cs
index 4aa5dc41..2c0099f8 100644
--- a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsHierarchyAnnotation.cs
+++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsHierarchyAnnotation.cs
@@ -40,5 +40,4 @@ namespace UnityTest
EditorGUIUtility.SetIconSize(Vector2.zero);
}
}
-
}
\ No newline at end of file
diff --git a/Doxyfile b/Doxyfile
index 08765742..c18bbf84 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -1,4 +1,4 @@
-# Doxyfile 1.8.6
+# Doxyfile 1.8.11
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
@@ -38,7 +38,7 @@ PROJECT_NAME = Fungus
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 1.4.0
+PROJECT_NUMBER = 3.2
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -46,21 +46,21 @@ PROJECT_NUMBER = 1.4.0
PROJECT_BRIEF = "An open source plugin for Unity 3D for creating graphic interactive fiction games"
-# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
-# the documentation. The maximum height of the logo should not exceed 55 pixels
-# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
-# to the output directory.
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
-PROJECT_LOGO = /Users/Gregan/github/snozbot-fungus/Assets/Fungus/Docs/LogoMin.png
+PROJECT_LOGO = "/Users/Gregan/github/fungus/Assets/Tests/TestAssets/Sprites/Mushroom 1.png"
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
-OUTPUT_DIRECTORY = /Users/Gregan/github/snozbot-fungus/Build/Doxygen
+OUTPUT_DIRECTORY = /Users/Gregan/github/fungus/Build/Doxygen
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
# will distribute the generated files over these directories. Enabling this
# option can be useful when feeding doxygen a huge amount of source files, where
@@ -70,6 +70,14 @@ OUTPUT_DIRECTORY = /Users/Gregan/github/snozbot-fungus/Build/Doxygen
CREATE_SUBDIRS = NO
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES = NO
+
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all constant output in the proper language.
@@ -85,14 +93,14 @@ CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
-# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
# descriptions after the members that are listed in the file and class
# documentation (similar to Javadoc). Set to NO to disable this.
# The default value is: YES.
BRIEF_MEMBER_DESC = YES
-# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
# description of a member or function before the detailed description
#
# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
@@ -137,7 +145,7 @@ ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
-# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
# before files name in the file list and in the header files. If set to NO the
# shortest path that makes the file name unique will be used
# The default value is: YES.
@@ -207,9 +215,9 @@ MULTILINE_CPP_IS_BRIEF = NO
INHERIT_DOCS = YES
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
-# new page for each member. If set to NO, the documentation of a member will be
-# part of the file/class/namespace that contains it.
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
# The default value is: NO.
SEPARATE_MEMBER_PAGES = NO
@@ -271,11 +279,14 @@ OPTIMIZE_OUTPUT_VHDL = NO
# extension. Doxygen has a built-in mapping, but you can override or extend it
# using this tag. The format is ext=language, where ext is a file extension, and
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
-# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C.
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
+# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
+# Fortran. In the later case the parser tries to guess whether the code is fixed
+# or free formatted code, this is the default for Fortran type files), VHDL. For
+# instance to make doxygen treat .inc files as Fortran files (default is PHP),
+# and .f files as C (default is Fortran), use: inc=Fortran f=C.
#
-# Note For files without extension you can use no_extension as a placeholder.
+# Note: For files without extension you can use no_extension as a placeholder.
#
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
@@ -294,8 +305,8 @@ MARKDOWN_SUPPORT = YES
# When enabled doxygen tries to link words that correspond to documented
# classes, or namespaces to their corresponding documentation. Such a link can
-# be prevented in individual cases by by putting a % sign in front of the word
-# or globally by setting AUTOLINK_SUPPORT to NO.
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
# The default value is: YES.
AUTOLINK_SUPPORT = YES
@@ -335,13 +346,20 @@ SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
+# tag is set to YES then doxygen will reuse the documentation of the first
# member in the group (if any) for the other members of the group. By default
# all members of a group must be documented explicitly.
# The default value is: NO.
DISTRIBUTE_GROUP_DOC = NO
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
# Set the SUBGROUPING tag to YES to allow class member groups of the same type
# (for instance a group of public functions) to be put as a subgroup of that
# type (e.g. under the Public Functions section). Set it to NO to prevent
@@ -400,7 +418,7 @@ LOOKUP_CACHE_SIZE = 0
# Build related configuration options
#---------------------------------------------------------------------------
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
# documentation are documented, even if no documentation was available. Private
# class members and static file members will be hidden unless the
# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
@@ -410,35 +428,35 @@ LOOKUP_CACHE_SIZE = 0
EXTRACT_ALL = NO
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
# be included in the documentation.
# The default value is: NO.
EXTRACT_PRIVATE = NO
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
# scope will be included in the documentation.
# The default value is: NO.
EXTRACT_PACKAGE = NO
-# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
# included in the documentation.
# The default value is: NO.
EXTRACT_STATIC = NO
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
-# locally in source files will be included in the documentation. If set to NO
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
# only classes defined in header files are included. Does not have any effect
# for Java sources.
# The default value is: YES.
EXTRACT_LOCAL_CLASSES = YES
-# This flag is only useful for Objective-C code. When set to YES local methods,
+# This flag is only useful for Objective-C code. If set to YES, local methods,
# which are defined in the implementation section but not in the interface are
-# included in the documentation. If set to NO only methods in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
# included.
# The default value is: NO.
@@ -463,21 +481,21 @@ HIDE_UNDOC_MEMBERS = NO
# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
# undocumented classes that are normally visible in the class hierarchy. If set
-# to NO these classes will be included in the various overviews. This option has
-# no effect if EXTRACT_ALL is enabled.
+# to NO, these classes will be included in the various overviews. This option
+# has no effect if EXTRACT_ALL is enabled.
# The default value is: NO.
HIDE_UNDOC_CLASSES = NO
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
-# (class|struct|union) declarations. If set to NO these declarations will be
+# (class|struct|union) declarations. If set to NO, these declarations will be
# included in the documentation.
# The default value is: NO.
HIDE_FRIEND_COMPOUNDS = NO
# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
-# documentation blocks found inside the body of a function. If set to NO these
+# documentation blocks found inside the body of a function. If set to NO, these
# blocks will be appended to the function's detailed documentation block.
# The default value is: NO.
@@ -491,7 +509,7 @@ HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
-# names in lower-case letters. If set to YES upper-case letters are also
+# names in lower-case letters. If set to YES, upper-case letters are also
# allowed. This is useful if you have classes or files whose names only differ
# in case and if your file system supports case sensitive file names. Windows
# and Mac users are advised to set this option to NO.
@@ -500,12 +518,19 @@ INTERNAL_DOCS = NO
CASE_SENSE_NAMES = NO
# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
-# their full class and namespace scopes in the documentation. If set to YES the
+# their full class and namespace scopes in the documentation. If set to YES, the
# scope will be hidden.
# The default value is: NO.
HIDE_SCOPE_NAMES = NO
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
# the files that are included by a file in the documentation of that file.
# The default value is: YES.
@@ -533,14 +558,14 @@ INLINE_INFO = YES
# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
# (detailed) documentation of file and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order.
+# name. If set to NO, the members will appear in declaration order.
# The default value is: YES.
SORT_MEMBER_DOCS = YES
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
# descriptions of file, namespace and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order. Note that
+# name. If set to NO, the members will appear in declaration order. Note that
# this will also influence the order of the classes in the class list.
# The default value is: NO.
@@ -585,27 +610,25 @@ SORT_BY_SCOPE_NAME = NO
STRICT_PROTO_MATCHING = NO
-# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
-# todo list. This list is created by putting \todo commands in the
-# documentation.
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
# The default value is: YES.
GENERATE_TODOLIST = YES
-# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
-# test list. This list is created by putting \test commands in the
-# documentation.
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
# The default value is: YES.
GENERATE_TESTLIST = YES
-# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
# list. This list is created by putting \bug commands in the documentation.
# The default value is: YES.
GENERATE_BUGLIST = YES
-# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
# the deprecated list. This list is created by putting \deprecated commands in
# the documentation.
# The default value is: YES.
@@ -630,8 +653,8 @@ ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
-# the bottom of the documentation of classes and structs. If set to YES the list
-# will mention the files that were used to generate the documentation.
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
# The default value is: YES.
SHOW_USED_FILES = YES
@@ -679,8 +702,7 @@ LAYOUT_FILE =
# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
# For LaTeX the style of the bibliography can be controlled using
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
-# search path. Do not use file names with spaces, bibtex cannot handle them. See
-# also \cite for info how to create references.
+# search path. See also \cite for info how to create references.
CITE_BIB_FILES =
@@ -696,7 +718,7 @@ CITE_BIB_FILES =
QUIET = NO
# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
# this implies that the warnings are on.
#
# Tip: Turn warnings on while writing the documentation.
@@ -704,7 +726,7 @@ QUIET = NO
WARNINGS = YES
-# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
# will automatically be disabled.
# The default value is: YES.
@@ -721,12 +743,18 @@ WARN_IF_DOC_ERROR = YES
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
# are documented, but have no documentation for their parameters or return
-# value. If set to NO doxygen will only warn about wrong or incomplete parameter
-# documentation, but not about the absence of documentation.
+# value. If set to NO, doxygen will only warn about wrong or incomplete
+# parameter documentation, but not about the absence of documentation.
# The default value is: NO.
WARN_NO_PARAMDOC = NO
+# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
+# a warning is encountered.
+# The default value is: NO.
+
+WARN_AS_ERROR = NO
+
# The WARN_FORMAT tag determines the format of the warning messages that doxygen
# can produce. The string should contain the $file, $line, and $text tags, which
# will be replaced by the file and line number from which the warning originated
@@ -750,25 +778,11 @@ WARN_LOGFILE =
# The INPUT tag is used to specify the files and/or directories that contain
# documented source files. You may enter file names like myfile.cpp or
# directories like /usr/src/myproject. Separate the files or directories with
-# spaces.
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = Assets/Fungus/Scripts/ \
- Assets/Fungus/Scripts/Button.cs \
- Assets/Fungus/Scripts/CameraController.cs \
- Assets/Fungus/Scripts/CommandQueue.cs \
- Assets/Fungus/Scripts/FixedHeightSprite.cs \
- Assets/Fungus/Scripts/Game.cs \
- Assets/Fungus/Scripts/GameController.cs \
- Assets/Fungus/Scripts/GameState.cs \
- Assets/Fungus/Scripts/Page.cs \
- Assets/Fungus/Scripts/PageStyle.cs \
- Assets/Fungus/Scripts/Room.cs \
- Assets/Fungus/Scripts/SpriteFader.cs \
- Assets/Fungus/Scripts/StringsParser.cs \
- Assets/Fungus/Scripts/StringTable.cs \
- Assets/Fungus/Scripts/View.cs \
- Assets/Fungus/Docs
+INPUT = Assets/Fungus \
+ Docs
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -781,12 +795,17 @@ INPUT_ENCODING = UTF-8
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank the
-# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
-# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
-# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
-# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
-# *.qsf, *.as and *.js.
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
+# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
+# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl,
+# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js.
FILE_PATTERNS = *.c \
*.cc \
@@ -835,7 +854,7 @@ FILE_PATTERNS = *.c \
# be searched for input files as well.
# The default value is: NO.
-RECURSIVE = NO
+RECURSIVE = YES
# The EXCLUDE tag can be used to specify files and/or directories that should be
# excluded from the INPUT source files. This way you can easily exclude a
@@ -913,6 +932,10 @@ IMAGE_PATH =
# Note that the filter must not add or remove lines; it is applied before the
# code is scanned, but not when the output code is generated. If lines are added
# or removed, the anchors will not be placed correctly.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
INPUT_FILTER =
@@ -922,11 +945,15 @@ INPUT_FILTER =
# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
# patterns match the file name, INPUT_FILTER is applied.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
FILTER_PATTERNS =
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER ) will also be used to filter the input files that are used for
+# INPUT_FILTER) will also be used to filter the input files that are used for
# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
# The default value is: NO.
@@ -986,7 +1013,7 @@ REFERENCED_BY_RELATION = NO
REFERENCES_RELATION = NO
# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
-# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
# link to the documentation.
# The default value is: YES.
@@ -1033,13 +1060,13 @@ USE_HTAGS = NO
VERBATIM_HEADERS = YES
-# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the
-# clang parser (see: http://clang.llvm.org/) for more acurate parsing at the
+# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
+# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
# cost of reduced performance. This can be particularly helpful with template
# rich C++ code for which doxygen's built-in parser lacks the necessary type
# information.
# Note: The availability of this option depends on whether or not doxygen was
-# compiled with the --with-libclang option.
+# generated with the -Duse-libclang=ON option for CMake.
# The default value is: NO.
CLANG_ASSISTED_PARSING = NO
@@ -1082,7 +1109,7 @@ IGNORE_PREFIX =
# Configuration options related to the HTML output
#---------------------------------------------------------------------------
-# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
# The default value is: YES.
GENERATE_HTML = YES
@@ -1144,13 +1171,15 @@ HTML_FOOTER =
HTML_STYLESHEET =
-# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
-# defined cascading style sheet that is included after the standard style sheets
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
# created by doxygen. Using this option one can overrule certain style aspects.
# This is preferred over using HTML_STYLESHEET since it does not replace the
-# standard style sheet and is therefor more robust against future updates.
-# Doxygen will copy the style sheet file to the output directory. For an example
-# see the documentation.
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_STYLESHEET =
@@ -1166,7 +1195,7 @@ HTML_EXTRA_STYLESHEET =
HTML_EXTRA_FILES =
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
-# will adjust the colors in the stylesheet and background images according to
+# will adjust the colors in the style sheet and background images according to
# this color. Hue is specified as an angle on a colorwheel, see
# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
@@ -1197,8 +1226,9 @@ HTML_COLORSTYLE_GAMMA = 80
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
# page will contain the date and time when the page was generated. Setting this
-# to NO can help when comparing the output of multiple runs.
-# The default value is: YES.
+# to YES can help to show when doxygen was last run and thus if the
+# documentation is up to date.
+# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_TIMESTAMP = YES
@@ -1294,28 +1324,29 @@ GENERATE_HTMLHELP = NO
CHM_FILE =
# The HHC_LOCATION tag can be used to specify the location (absolute path
-# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
# doxygen will try to run the HTML help compiler on the generated index.hhp.
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
HHC_LOCATION =
-# The GENERATE_CHI flag controls if a separate .chi index file is generated (
-# YES) or that it should be included in the master .chm file ( NO).
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the master .chm file (NO).
# The default value is: NO.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
GENERATE_CHI = NO
-# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
CHM_INDEX_ENCODING =
-# The BINARY_TOC flag controls whether a binary table of contents is generated (
-# YES) or a normal table of contents ( NO) in the .chm file.
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
@@ -1428,7 +1459,7 @@ DISABLE_INDEX = NO
# index structure (just like the one that is generated for HTML Help). For this
# to work a browser that supports JavaScript, DHTML, CSS and frames is required
# (i.e. any modern browser). Windows users are probably better off using the
-# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
# further fine-tune the look of the index. As an example, the default style
# sheet generated by doxygen has an example that shows how to put an image at
# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
@@ -1456,7 +1487,7 @@ ENUM_VALUES_PER_LINE = 4
TREEVIEW_WIDTH = 250
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
# external symbols imported via tag files in a separate window.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
@@ -1485,7 +1516,7 @@ FORMULA_TRANSPARENT = YES
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
# http://www.mathjax.org) which uses client side Javascript for the rendering
-# instead of using prerendered bitmaps. Use this if you do not have LaTeX
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
# installed or if you want to formulas look prettier in the HTML output. When
# enabled you may also need to install MathJax separately and configure the path
# to it using the MATHJAX_RELPATH option.
@@ -1551,15 +1582,15 @@ MATHJAX_CODEFILE =
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.
-SEARCHENGINE = NO
+SEARCHENGINE = YES
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a web server instead of a web client using Javascript. There
-# are two flavours of web server based searching depending on the
-# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
-# searching and an index file used by the script. When EXTERNAL_SEARCH is
-# enabled the indexing and searching needs to be provided by external tools. See
-# the section "External Indexing and Searching" for details.
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
# The default value is: NO.
# This tag requires that the tag SEARCHENGINE is set to YES.
@@ -1571,7 +1602,7 @@ SERVER_BASED_SEARCH = NO
# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
# search results.
#
-# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# Doxygen ships with an example indexer (doxyindexer) and search engine
# (doxysearch.cgi) which are based on the open source search engine library
# Xapian (see: http://xapian.org/).
#
@@ -1584,7 +1615,7 @@ EXTERNAL_SEARCH = NO
# The SEARCHENGINE_URL should point to a search engine hosted by a web server
# which will return the search results when EXTERNAL_SEARCH is enabled.
#
-# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# Doxygen ships with an example indexer (doxyindexer) and search engine
# (doxysearch.cgi) which are based on the open source search engine library
# Xapian (see: http://xapian.org/). See the section "External Indexing and
# Searching" for details.
@@ -1622,7 +1653,7 @@ EXTRA_SEARCH_MAPPINGS =
# Configuration options related to the LaTeX output
#---------------------------------------------------------------------------
-# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
# The default value is: YES.
GENERATE_LATEX = NO
@@ -1653,7 +1684,7 @@ LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
-# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
# documents. This may be useful for small projects and may help to save some
# trees in general.
# The default value is: NO.
@@ -1671,9 +1702,12 @@ COMPACT_LATEX = NO
PAPER_TYPE = a4
# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
-# that should be included in the LaTeX output. To get the times font for
-# instance you can specify
-# EXTRA_PACKAGES=times
+# that should be included in the LaTeX output. The package can be specified just
+# by its name or with the correct syntax as to be used with the LaTeX
+# \usepackage command. To get the times font for instance you can specify :
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
+# To use the option intlimits with the amsmath package you can specify:
+# EXTRA_PACKAGES=[intlimits]{amsmath}
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
@@ -1687,23 +1721,36 @@ EXTRA_PACKAGES =
#
# Note: Only use a user-defined header if you know what you are doing! The
# following commands have a special meaning inside the header: $title,
-# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
-# replace them by respectively the title of the page, the current date and time,
-# only the current date, the version number of doxygen, the project name (see
-# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
+# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
+# string, for the replacement values of the other commands the user is referred
+# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_HEADER =
# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
# generated LaTeX document. The footer should contain everything after the last
-# chapter. If it is left blank doxygen will generate a standard footer.
+# chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer.
#
# Note: Only use a user-defined footer if you know what you are doing!
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_FOOTER =
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET =
+
# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the LATEX_OUTPUT output
# directory. Note that the files will be copied as-is; there are no commands or
@@ -1721,8 +1768,8 @@ LATEX_EXTRA_FILES =
PDF_HYPERLINKS = YES
-# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
-# the PDF file directly from the LaTeX files. Set this option to YES to get a
+# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES, to get a
# higher quality PDF documentation.
# The default value is: YES.
# This tag requires that the tag GENERATE_LATEX is set to YES.
@@ -1763,11 +1810,19 @@ LATEX_SOURCE_CODE = NO
LATEX_BIB_STYLE = plain
+# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_TIMESTAMP = NO
+
#---------------------------------------------------------------------------
# Configuration options related to the RTF output
#---------------------------------------------------------------------------
-# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
# RTF output is optimized for Word 97 and may not look too pretty with other RTF
# readers/editors.
# The default value is: NO.
@@ -1782,7 +1837,7 @@ GENERATE_RTF = NO
RTF_OUTPUT = rtf
-# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
# documents. This may be useful for small projects and may help to save some
# trees in general.
# The default value is: NO.
@@ -1819,11 +1874,21 @@ RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
+# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
+# with syntax highlighting in the RTF output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_SOURCE_CODE = NO
+
#---------------------------------------------------------------------------
# Configuration options related to the man page output
#---------------------------------------------------------------------------
-# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
# classes and files.
# The default value is: NO.
@@ -1847,6 +1912,13 @@ MAN_OUTPUT = man
MAN_EXTENSION = .3
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR =
+
# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
# will generate one additional man file for each entity documented in the real
# man page(s). These additional files only source the real man page, but without
@@ -1860,7 +1932,7 @@ MAN_LINKS = NO
# Configuration options related to the XML output
#---------------------------------------------------------------------------
-# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
# captures the structure of the code including all documentation.
# The default value is: NO.
@@ -1874,19 +1946,7 @@ GENERATE_XML = NO
XML_OUTPUT = xml
-# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a
-# validating XML parser to check the syntax of the XML files.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify a XML DTD, which can be used by a
-# validating XML parser to check the syntax of the XML files.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
# listings (including syntax highlighting and cross-referencing information) to
# the XML output. Note that enabling this will significantly increase the size
# of the XML output.
@@ -1899,7 +1959,7 @@ XML_PROGRAMLISTING = YES
# Configuration options related to the DOCBOOK output
#---------------------------------------------------------------------------
-# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
# that can be used to generate PDF.
# The default value is: NO.
@@ -1913,14 +1973,23 @@ GENERATE_DOCBOOK = NO
DOCBOOK_OUTPUT = docbook
+# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
+# program listings (including syntax highlighting and cross-referencing
+# information) to the DOCBOOK output. Note that enabling this will significantly
+# increase the size of the DOCBOOK output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_PROGRAMLISTING = NO
+
#---------------------------------------------------------------------------
# Configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
-# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
-# Definitions (see http://autogen.sf.net) file that captures the structure of
-# the code including all documentation. Note that this feature is still
-# experimental and incomplete at the moment.
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see http://autogen.sf.net) file that captures the
+# structure of the code including all documentation. Note that this feature is
+# still experimental and incomplete at the moment.
# The default value is: NO.
GENERATE_AUTOGEN_DEF = NO
@@ -1929,7 +1998,7 @@ GENERATE_AUTOGEN_DEF = NO
# Configuration options related to the Perl module output
#---------------------------------------------------------------------------
-# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
# file that captures the structure of the code including all documentation.
#
# Note that this feature is still experimental and incomplete at the moment.
@@ -1937,7 +2006,7 @@ GENERATE_AUTOGEN_DEF = NO
GENERATE_PERLMOD = NO
-# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
# output from the Perl module output.
# The default value is: NO.
@@ -1945,9 +2014,9 @@ GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
# formatted so it can be parsed by a human reader. This is useful if you want to
-# understand what is going on. On the other hand, if this tag is set to NO the
+# understand what is going on. On the other hand, if this tag is set to NO, the
# size of the Perl module output will be much smaller and Perl will parse it
# just the same.
# The default value is: YES.
@@ -1967,14 +2036,14 @@ PERLMOD_MAKEVAR_PREFIX =
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
-# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
# C-preprocessor directives found in the sources and include files.
# The default value is: YES.
ENABLE_PREPROCESSING = YES
-# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
-# in the source code. If set to NO only conditional compilation will be
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
# performed. Macro expansion can be done in a controlled way by setting
# EXPAND_ONLY_PREDEF to YES.
# The default value is: NO.
@@ -1990,7 +2059,7 @@ MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
-# If the SEARCH_INCLUDES tag is set to YES the includes files in the
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
# INCLUDE_PATH will be searched if a #include is found.
# The default value is: YES.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
@@ -2032,9 +2101,9 @@ PREDEFINED =
EXPAND_AS_DEFINED =
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
-# remove all refrences to function-like macros that are alone on a line, have an
-# all uppercase name, and do not end with a semicolon. Such function macros are
-# typically used for boiler-plate code, and will confuse the parser if not
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
# removed.
# The default value is: YES.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
@@ -2054,7 +2123,7 @@ SKIP_FUNCTION_MACROS = YES
# where loc1 and loc2 can be relative or absolute paths or URLs. See the
# section "Linking to external documentation" for more information about the use
# of tag files.
-# Note: Each tag file must have an unique name (where the name does NOT include
+# Note: Each tag file must have a unique name (where the name does NOT include
# the path). If a tag file is not located in the directory in which doxygen is
# run, you must also specify the path to the tagfile here.
@@ -2066,20 +2135,21 @@ TAGFILES =
GENERATE_TAGFILE =
-# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
-# class index. If set to NO only the inherited external classes will be listed.
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
+# the class index. If set to NO, only the inherited external classes will be
+# listed.
# The default value is: NO.
ALLEXTERNALS = NO
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
-# the modules index. If set to NO, only the current project's groups will be
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will be
# listed.
# The default value is: YES.
EXTERNAL_GROUPS = YES
-# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
# the related pages index. If set to NO, only the current project's pages will
# be listed.
# The default value is: YES.
@@ -2096,14 +2166,14 @@ PERL_PATH = /usr/bin/perl
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
-# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
+# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
# NO turns the diagrams off. Note that this option also works with HAVE_DOT
# disabled, but it is recommended to install and use dot, since it yields more
# powerful graphs.
# The default value is: YES.
-CLASS_DIAGRAMS = NO
+CLASS_DIAGRAMS = YES
# You can define message sequence charts within doxygen comments using the \msc
# command. Doxygen will then run the mscgen tool (see:
@@ -2121,7 +2191,7 @@ MSCGEN_PATH =
DIA_PATH =
-# If set to YES, the inheritance and collaboration graphs will hide inheritance
+# If set to YES the inheritance and collaboration graphs will hide inheritance
# and usage relations if the target is undocumented or is not a class.
# The default value is: YES.
@@ -2146,7 +2216,7 @@ HAVE_DOT = NO
DOT_NUM_THREADS = 0
-# When you want a differently looking font n the dot files that doxygen
+# When you want a differently looking font in the dot files that doxygen
# generates you can specify the font name using DOT_FONTNAME. You need to make
# sure dot is able to find the font, which can be done by putting it in a
# standard location or by setting the DOTFONTPATH environment variable or by
@@ -2194,7 +2264,7 @@ COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
# collaboration diagrams in a style similar to the OMG's Unified Modeling
# Language.
# The default value is: NO.
@@ -2246,7 +2316,8 @@ INCLUDED_BY_GRAPH = YES
#
# Note that enabling this option will significantly increase the time of a run.
# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
+# functions only using the \callgraph command. Disabling a call graph can be
+# accomplished by means of the command \hidecallgraph.
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.
@@ -2257,7 +2328,8 @@ CALL_GRAPH = NO
#
# Note that enabling this option will significantly increase the time of a run.
# So in most cases it will be better to enable caller graphs for selected
-# functions only using the \callergraph command.
+# functions only using the \callergraph command. Disabling a caller graph can be
+# accomplished by means of the command \hidecallergraph.
# The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES.
@@ -2280,11 +2352,15 @@ GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot.
+# generated by dot. For an explanation of the image formats see the section
+# output formats in the documentation of the dot tool (Graphviz (see:
+# http://www.graphviz.org/)).
# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
# to make the SVG files visible in IE 9+ (other browsers do not have this
# requirement).
-# Possible values are: png, jpg, gif and svg.
+# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
+# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
+# png:gdiplus:gdiplus.
# The default value is: png.
# This tag requires that the tag HAVE_DOT is set to YES.
@@ -2327,6 +2403,19 @@ MSCFILE_DIRS =
DIAFILE_DIRS =
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file. If left blank, it is assumed
+# PlantUML is not used or called during a preprocessing step. Doxygen will
+# generate a warning when it encounters a \startuml command in this case and
+# will not generate output for the diagram.
+
+PLANTUML_JAR_PATH =
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH =
+
# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
# that will be shown in the graph. If the number of nodes in a graph becomes
# larger than this value, doxygen will truncate the graph, which is visualized
@@ -2363,7 +2452,7 @@ MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = NO
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
# files in one run (i.e. multiple -o and -T options on the command line). This
# makes dot run faster, but since only newer versions of dot (>1.8.10) support
# this, this feature is disabled by default.
@@ -2380,7 +2469,7 @@ DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
-# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
# files that are used to generate the various graphs.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset
index 12771120..057c661a 100644
--- a/ProjectSettings/GraphicsSettings.asset
+++ b/ProjectSettings/GraphicsSettings.asset
@@ -39,20 +39,20 @@ GraphicsSettings:
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
m_ShaderSettings_Tier1:
- useCascadedShadowMaps: 0
- standardShaderQuality: 0
- useReflectionProbeBoxProjection: 0
- useReflectionProbeBlending: 0
+ useCascadedShadowMaps: 1
+ standardShaderQuality: 2
+ useReflectionProbeBoxProjection: 1
+ useReflectionProbeBlending: 1
m_ShaderSettings_Tier2:
- useCascadedShadowMaps: 0
- standardShaderQuality: 1
- useReflectionProbeBoxProjection: 0
- useReflectionProbeBlending: 0
+ useCascadedShadowMaps: 1
+ standardShaderQuality: 2
+ useReflectionProbeBoxProjection: 1
+ useReflectionProbeBlending: 1
m_ShaderSettings_Tier3:
- useCascadedShadowMaps: 0
- standardShaderQuality: 1
- useReflectionProbeBoxProjection: 0
- useReflectionProbeBlending: 0
+ useCascadedShadowMaps: 1
+ standardShaderQuality: 2
+ useReflectionProbeBoxProjection: 1
+ useReflectionProbeBlending: 1
m_BuildTargetShaderSettings: []
m_LightmapStripping: 0
m_FogStripping: 0