Browse Source

Removed defaultPortraitStage from FungusScript #84

We want to keep FungusScript orthogonal to other modules like Portrait,
Dialog, etc. to make it easier to swap modules in and out in future.
master
chrisgregan 10 years ago
parent
commit
ae42c031bd
  1. 6
      Assets/Fungus/FungusScript/Scripts/FungusScript.cs
  2. 1
      Assets/Fungus/Portrait/Editor/PortraitEditor.cs
  3. 1
      Assets/Fungus/Portrait/Editor/StageEditor.cs
  4. 1
      Assets/Fungus/Portrait/Scripts/Portrait.cs
  5. 2
      Assets/Fungus/Portrait/Scripts/Stage.cs
  6. 5
      Assets/FungusExamples/Sherlock/TheExperiment.unity

6
Assets/Fungus/FungusScript/Scripts/FungusScript.cs

@ -64,12 +64,6 @@ namespace Fungus
[Tooltip("Description text displayed in the Fungus Script editor window")]
public string description = "";
/**
* Portrait Stage to use for this game.
*/
[Tooltip("Default stage to display portraits on")]
public PortraitStage defaultPortraitStage;
/**
* Minimum time for each command to execute when runSlowInEditor is enabled.
*/

1
Assets/Fungus/Portrait/Editor/PortraitEditor.cs

@ -101,7 +101,6 @@ namespace Fungus
}
if (t.portraitStage == null) // If default portrait stage selected
{
ps = t.GetFungusScript().defaultPortraitStage;; // Try to get game's default portrait stage
if (t.portraitStage == null) // If no default specified, try to get any portrait stage in the scene
{
ps = GameObject.FindObjectOfType<PortraitStage>();

1
Assets/Fungus/Portrait/Editor/StageEditor.cs

@ -65,7 +65,6 @@ namespace Fungus
// Only show optional portrait fields once required fields have been filled...
if (t.portraitStage != null) // Character is selected
{
ps = t.GetFungusScript().defaultPortraitStage;; // Try to get game's default portrait stage
if (t.portraitStage == null) // If no default specified, try to get any portrait stage in the scene
{
ps = GameObject.FindObjectOfType<PortraitStage>();

1
Assets/Fungus/Portrait/Scripts/Portrait.cs

@ -119,7 +119,6 @@ namespace Fungus
// Selected "use default Portrait Stage"
if (portraitStage == null) // Default portrait stage selected
{
portraitStage = GetFungusScript().defaultPortraitStage;; // Try to get game's default portrait stage
if (portraitStage == null) // If no default specified, try to get any portrait stage in the scene
{
portraitStage = GameObject.FindObjectOfType<PortraitStage>();

2
Assets/Fungus/Portrait/Scripts/Stage.cs

@ -52,7 +52,6 @@ namespace Fungus
// Selected "use default Portrait Stage"
if (portraitStage == null) // Default portrait stage selected
{
portraitStage = GetFungusScript().defaultPortraitStage;; // Try to get game's default portrait stage
if (portraitStage == null) // If no default specified, try to get any portrait stage in the scene
{
portraitStage = GameObject.FindObjectOfType<PortraitStage>();
@ -67,7 +66,6 @@ namespace Fungus
// Selected "use default Portrait Stage"
if (display == StageDisplayType.Swap) // Default portrait stage selected
{
replacedPortraitStage = GetFungusScript().defaultPortraitStage;; // Try to get game's default portrait stage
if (replacedPortraitStage == null) // If no default specified, try to get any portrait stage in the scene
{
replacedPortraitStage = GameObject.FindObjectOfType<PortraitStage>();

5
Assets/FungusExamples/Sherlock/TheExperiment.unity

@ -4035,10 +4035,9 @@ MonoBehaviour:
height: 2818.85034
selectedSequence: {fileID: 1390555298}
selectedCommands:
- {fileID: 1390555343}
- {fileID: 1390555345}
variables: []
description: 'Example scene from Sherlock: The Game Is On'
defaultPortraitStage: {fileID: 0}
runSlowDuration: 0
colorCommands: 1
hideComponents: 1
@ -4094,7 +4093,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
nodeRect:
serializedVersion: 2
x: -2589.33252
x: -2590.33252
y: -1077.83801
width: 120
height: 40

Loading…
Cancel
Save