diff --git a/Assets/Example/Scenes/Example.unity b/Assets/Example/Scenes/Example.unity index 3d3cd421..dbdef2a9 100644 Binary files a/Assets/Example/Scenes/Example.unity and b/Assets/Example/Scenes/Example.unity differ diff --git a/Assets/Fungus/FungusScript/Commands/SetActive.cs b/Assets/Fungus/FungusScript/Commands/SetActive.cs new file mode 100644 index 00000000..3156c8bb --- /dev/null +++ b/Assets/Fungus/FungusScript/Commands/SetActive.cs @@ -0,0 +1,42 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + +namespace Fungus +{ + [CommandInfo("Scripting", + "Set Active", + "Sets a game object to be active / inactive.")] + public class SetActive : Command + { + public GameObject targetGameObject; + + public BooleanData activeState; + + public override void OnEnter() + { + if (targetGameObject != null) + { + targetGameObject.SetActive(activeState.Value); + } + + Continue(); + } + + public override string GetSummary() + { + if (targetGameObject == null) + { + return "Error: No game object selected"; + } + + return targetGameObject.name; + } + + public override Color GetButtonColor() + { + return new Color32(235, 191, 217, 255); + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/FungusScript/Commands/SetActive.cs.meta b/Assets/Fungus/FungusScript/Commands/SetActive.cs.meta new file mode 100644 index 00000000..94fe6f3a --- /dev/null +++ b/Assets/Fungus/FungusScript/Commands/SetActive.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dbd8c931f22994b9d90e2037fffaa770 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Fungus/Sprite/Prefabs/Background.prefab b/Assets/Fungus/Sprite/Prefabs/Background.prefab new file mode 100644 index 00000000..c87d82ca Binary files /dev/null and b/Assets/Fungus/Sprite/Prefabs/Background.prefab differ diff --git a/Assets/Fungus/Sprite/Prefabs/Background.prefab.meta b/Assets/Fungus/Sprite/Prefabs/Background.prefab.meta new file mode 100644 index 00000000..f3ac1cf1 --- /dev/null +++ b/Assets/Fungus/Sprite/Prefabs/Background.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 7dd153b86fca74c329ccf129422fdbe2 +NativeFormatImporter: + userData: diff --git a/Assets/Fungus/Sprite/Sprites.meta b/Assets/Fungus/Sprite/Sprites.meta new file mode 100644 index 00000000..ca44e96b --- /dev/null +++ b/Assets/Fungus/Sprite/Sprites.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: bbfa0b731252a4b70ad8eaf428d86965 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Fungus/Sprite/Sprites/Background.png b/Assets/Fungus/Sprite/Sprites/Background.png new file mode 100644 index 00000000..fe1f1993 Binary files /dev/null and b/Assets/Fungus/Sprite/Sprites/Background.png differ diff --git a/Assets/Fungus/Sprite/Sprites/Background.png.meta b/Assets/Fungus/Sprite/Sprites/Background.png.meta new file mode 100644 index 00000000..bc39ee0e --- /dev/null +++ b/Assets/Fungus/Sprite/Sprites/Background.png.meta @@ -0,0 +1,48 @@ +fileFormatVersion: 2 +guid: 78bc8db714c3749cc8bd8c0b7e525b85 +TextureImporter: + fileIDToRecycleName: + 21300000: Background + 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: 1024 + textureSettings: + filterMode: 0 + 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: