|
|
|
@ -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); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|