diff --git a/Assets/Fungus/Prefabs/Game.prefab b/Assets/Fungus/Prefabs/Game.prefab index 9a462559..cb86b59f 100644 Binary files a/Assets/Fungus/Prefabs/Game.prefab and b/Assets/Fungus/Prefabs/Game.prefab differ diff --git a/Assets/Fungus/Scripts/Button.cs b/Assets/Fungus/Scripts/Button.cs index fbc607f5..8cd8a415 100644 --- a/Assets/Fungus/Scripts/Button.cs +++ b/Assets/Fungus/Scripts/Button.cs @@ -13,15 +13,16 @@ namespace Fungus [RequireComponent (typeof (Collider2D))] public class Button : MonoBehaviour { - public Action buttonAction; public SpriteRenderer spriteRenderer; + public bool autoDisplay; + public Action buttonAction; /** * Makes a sprite clickable by attaching a Button component (and BoxCollider2D if required). * @param _spriteRenderer The sprite to be made clickable * @param _buttonAction An Action delegate method to call when the player clicks on the sprite */ - public static void MakeButton(SpriteRenderer _spriteRenderer, Action _buttonAction) + public static void MakeButton(SpriteRenderer _spriteRenderer, bool _autoDisplay, Action _buttonAction) { if (_spriteRenderer == null) { @@ -43,8 +44,17 @@ namespace Fungus } Button button = _spriteRenderer.gameObject.AddComponent