diff --git a/Assets/Fungus/Prefabs/AnchorGUITexture.prefab b/Assets/Fungus/Prefabs/AnchorGUITexture.prefab index 0c9fd8f7..d7ad42d4 100644 Binary files a/Assets/Fungus/Prefabs/AnchorGUITexture.prefab and b/Assets/Fungus/Prefabs/AnchorGUITexture.prefab differ diff --git a/Assets/FungusExample/Scenes/Example.unity b/Assets/FungusExample/Scenes/Example.unity index 34d5fb41..d4ad0875 100644 Binary files a/Assets/FungusExample/Scenes/Example.unity and b/Assets/FungusExample/Scenes/Example.unity differ diff --git a/Assets/FungusExample/Scripts/SpriteRoom.cs b/Assets/FungusExample/Scripts/SpriteRoom.cs index 2b5a9e06..446ad938 100644 --- a/Assets/FungusExample/Scripts/SpriteRoom.cs +++ b/Assets/FungusExample/Scripts/SpriteRoom.cs @@ -11,8 +11,15 @@ namespace Fungus.Example public SpriteRenderer blueAlienSprite; public SpriteRenderer redMushroomSprite; + // AnchorGUITexture displays a texture at the same size & position regardless of screen resolution. + // This is handy for displaying simple GUI textures in a consistent manner across devices. + public AnchorGUITexture mushroomLogo; + void OnEnter() { + // Show the mushroom logo immediately + mushroomLogo.enabled = true; + HideSprite(redMushroomSprite); ShowSprite(blueAlienSprite); @@ -57,6 +64,12 @@ namespace Fungus.Example Say("Heh. That Blue Alien - what a guy!"); + // We want the mushroom logo to hide just before we move to the menuRoom, + // so we pass a delegate method to the Call command which will execute as part of the command sequence. + Call(delegate { + mushroomLogo.enabled = false; + }); + MoveToRoom(menuRoom); } }