Browse Source

New placeholder demo scene

master
chrisgregan 11 years ago
parent
commit
a50701d2ad
  1. 3
      Assets/Fungus/Editor/FungusScript/FungusScriptEditor.cs
  2. 10
      Assets/Fungus/Editor/FungusScript/SayEditor.cs
  3. BIN
      Assets/Fungus/Prefabs/Dialog.prefab
  4. 10
      Assets/Fungus/VisualScripting/FungusScript.cs
  5. 6
      Assets/Fungus/VisualScripting/Say.cs
  6. 5
      Assets/Fungus/VisualScripting/Sequence.cs
  7. 5
      Assets/Shuttle.meta
  8. BIN
      Assets/Shuttle/BlastOff.psd
  9. 48
      Assets/Shuttle/BlastOff.psd.meta
  10. BIN
      Assets/Shuttle/ShuttleGame.unity
  11. 4
      Assets/Shuttle/ShuttleGame.unity.meta
  12. BIN
      Assets/Shuttle/astronaut.psd
  13. 48
      Assets/Shuttle/astronaut.psd.meta
  14. BIN
      Assets/Shuttle/evil_lego.psd
  15. 48
      Assets/Shuttle/evil_lego.psd.meta
  16. BIN
      Assets/Shuttle/good_astronaut.psd
  17. 48
      Assets/Shuttle/good_astronaut.psd.meta
  18. BIN
      Assets/Shuttle/shuttle.psd
  19. 48
      Assets/Shuttle/shuttle.psd.meta

3
Assets/Fungus/Editor/FungusScript/FungusScriptEditor.cs

@ -86,6 +86,9 @@ namespace Fungus.Script
GUIContent startSequenceLabel = new GUIContent("Start Sequence", "Sequence to be executed when controller starts.");
t.startSequence = SequenceEditor.SequenceField(startSequenceLabel, t, t.startSequence);
GUIContent startAutomaticallyLabel = new GUIContent("Start Automatically", "Start this Fungus Script when the scene starts.");
t.startAutomatically = EditorGUILayout.Toggle(startAutomaticallyLabel, t.startAutomatically);
if (t.startSequence == null)
{
GUIStyle style = new GUIStyle(GUI.skin.label);

10
Assets/Fungus/Editor/FungusScript/SayEditor.cs

@ -14,12 +14,18 @@ namespace Fungus.Script
{
Say t = target as Say;
EditorGUI.BeginChangeCheck();
string character = EditorGUILayout.TextField(new GUIContent("Character", "Character to display in dialog"), t.character);
EditorGUILayout.PrefixLabel(new GUIContent("Say Text", "Text to display in dialog"));
EditorStyles.textField.wordWrap = true;
string text = EditorGUILayout.TextArea(t.text, GUILayout.MinHeight(50));
if (text != t.text)
if (EditorGUI.EndChangeCheck())
{
Undo.RecordObject(t, "Set Text");
Undo.RecordObject(t, "Set Say");
t.character = character;
t.text = text;
}
}

BIN
Assets/Fungus/Prefabs/Dialog.prefab

Binary file not shown.

10
Assets/Fungus/VisualScripting/FungusScript.cs

@ -20,6 +20,16 @@ namespace Fungus.Script
public List<Variable> variables = new List<Variable>();
public bool startAutomatically = false;
void Start()
{
if (startAutomatically)
{
Execute();
}
}
public void Execute()
{
if (startSequence == null)

6
Assets/Fungus/VisualScripting/Say.cs

@ -7,6 +7,7 @@ namespace Fungus.Script
{
public class Say : FungusCommand
{
public string character;
public string text;
public override void OnEnter()
@ -18,6 +19,11 @@ namespace Fungus.Script
return;
}
if (character.Length > 0)
{
dialog.SetCharacter(character);
}
dialog.Say (text, delegate {
Continue();
});

5
Assets/Fungus/VisualScripting/Sequence.cs

@ -34,6 +34,7 @@ namespace Fungus.Script
while (parent != null)
{
sc = parent.gameObject.GetComponent<FungusScript>();
if (sc != null)
{
break;
@ -103,14 +104,14 @@ namespace Fungus.Script
}
else
{
if (fungusScript.stepTime == 0f)
if (GetFungusScript().stepTime == 0f)
{
activeCommand = nextCommand;
nextCommand.Execute();
}
else
{
StartCoroutine(ExecuteAfterDelay(nextCommand, fungusScript.stepTime));
StartCoroutine(ExecuteAfterDelay(nextCommand, GetFungusScript().stepTime));
}
}

5
Assets/Shuttle.meta

@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: 004648c23027842d89a0ebbe7a187e16
folderAsset: yes
DefaultImporter:
userData:

BIN
Assets/Shuttle/BlastOff.psd

Binary file not shown.

48
Assets/Shuttle/BlastOff.psd.meta

@ -0,0 +1,48 @@
fileFormatVersion: 2
guid: a05caf3c2adde4354ab97475891baa4e
TextureImporter:
fileIDToRecycleName:
21300000: BlastOff
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

BIN
Assets/Shuttle/ShuttleGame.unity

Binary file not shown.

4
Assets/Shuttle/ShuttleGame.unity.meta

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: b146c63736a624985b231df6d811556c
DefaultImporter:
userData:

BIN
Assets/Shuttle/astronaut.psd

Binary file not shown.

48
Assets/Shuttle/astronaut.psd.meta

@ -0,0 +1,48 @@
fileFormatVersion: 2
guid: ac4b38619d5db44de80ed2cfda81e347
TextureImporter:
fileIDToRecycleName:
21300000: astronaut
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

BIN
Assets/Shuttle/evil_lego.psd

Binary file not shown.

48
Assets/Shuttle/evil_lego.psd.meta

@ -0,0 +1,48 @@
fileFormatVersion: 2
guid: 93a468c44b689462f885cf72b990adcf
TextureImporter:
fileIDToRecycleName:
21300000: evil_lego
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

BIN
Assets/Shuttle/good_astronaut.psd

Binary file not shown.

48
Assets/Shuttle/good_astronaut.psd.meta

@ -0,0 +1,48 @@
fileFormatVersion: 2
guid: 76e77ed4a223948648e4676fd5507897
TextureImporter:
fileIDToRecycleName:
21300000: good_astronaut
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:

BIN
Assets/Shuttle/shuttle.psd

Binary file not shown.

48
Assets/Shuttle/shuttle.psd.meta

@ -0,0 +1,48 @@
fileFormatVersion: 2
guid: 85395597a78fa41ec9f72ae513326eaa
TextureImporter:
fileIDToRecycleName:
21300000: shuttle
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
Loading…
Cancel
Save