Skip to content

Commit

Permalink
Add the win/lose messages
Browse files Browse the repository at this point in the history
  • Loading branch information
timotei committed Sep 17, 2011
1 parent 70af3ed commit 1e064d7
Show file tree
Hide file tree
Showing 10 changed files with 5,128 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ Credits for the used resources:
- WorldMap.jpg = http://www.foofa.net/maps/UnfairyTales/
- Darkville Farms Level
* character: http://www.spriters-resource.com/custom_edited/zelda/sheet/17565
* enemy: http://www.spriters-resource.com/snes/zeldalinkpast/sheet/7587

- Postcards: http://env1ro.deviantart.com/gallery/12151317#/d29sqn3
- Maps = http://www.spriters-resource.com/snes/zeldalinkpast/ , ``Backgrounds & Maps" category


6 changes: 6 additions & 0 deletions egp_story/Assets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ public class Assets
public static Texture2D DarkvilleFarmsBackground { get; private set; }
public static Texture2D DarkvilleFarmsBackgroundMask { get; private set; }

public static Texture2D LoseMessage { get; private set; }
public static Texture2D WinMessage { get; private set; }

/// <summary>
/// A blank 1x1 pixel (used by default for drawing lines)
/// </summary>
Expand Down Expand Up @@ -73,6 +76,9 @@ public static void LoadAssets( ContentManager content )
BugWalkNorth = content.Load<Texture2D>( "gfx/mobs/bug_walk_n" );
BugWalkEast = content.Load<Texture2D>( "gfx/mobs/bug_walk_e" );

LoseMessage = content.Load<Texture2D>( "gfx/postcard_lose" );
WinMessage = content.Load<Texture2D>( "gfx/postcard_win" );

// create the blank pixel
GraphicsDeviceManager graphicsManager = ( GraphicsDeviceManager )
content.ServiceProvider.GetService( typeof( IGraphicsDeviceManager ) );
Expand Down
1 change: 1 addition & 0 deletions egp_story/GameActor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public abstract class GameActor : IDrawable
public AnimatedSprite ProjectileEastAnim { get; set; }

public AnimatedSprite CurrentAnimation { get; set; }
public bool IsDead { get; set; }

public Rectangle BoundingBox
{
Expand Down
14 changes: 13 additions & 1 deletion egp_story/Levels/DarkvilleFarmsLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public class DarkvilleFarmsLevel : IStoryLevel
{
#region IStoryLevel Members
private LevelMap _map;
private bool _gameEnded;
private bool _won;

public DarkvilleFarmsLevel( Game game )
{
Expand Down Expand Up @@ -51,12 +53,22 @@ public DarkvilleFarmsLevel( Game game )

public void Update( GameTime gameTime )
{
_map.Update( gameTime );
if ( !_gameEnded ) {
_map.Update( gameTime );

if ( _map.ActorObjects.Count == 0 ) {
_gameEnded = true;
}
}
}

public void Draw( SpriteBatch spriteBatch, GameTime gameTime )
{
_map.Draw( spriteBatch, gameTime );

if ( _gameEnded ) {

}
}
#endregion
}
Expand Down
2,743 changes: 2,743 additions & 0 deletions egp_storyContent/gfx/postcard_lose.pdn

Large diffs are not rendered by default.

Binary file added egp_storyContent/gfx/postcard_lose.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,363 changes: 2,363 additions & 0 deletions egp_storyContent/gfx/postcard_win.pdn

Large diffs are not rendered by default.

Binary file added egp_storyContent/gfx/postcard_win.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/old-postcard-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/old-postcard-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1e064d7

Please sign in to comment.