Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
a-huy committed Jul 17, 2012
0 parents commit aa838a0
Show file tree
Hide file tree
Showing 115 changed files with 3,864 additions and 0 deletions.
24 changes: 24 additions & 0 deletions SuperAwesomeMagnetGame.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SuperAwesomeMagnetGame", "SuperAwesomeMagnetGame\SuperAwesomeMagnetGame.csproj", "{8186CF63-C057-438A-A3E9-87DEBE241B50}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SuperAwesomeMagnetGameContent", "SuperAwesomeMagnetGame\Content\SuperAwesomeMagnetGameContent.contentproj", "{E4EC5B34-CC40-4D86-9976-1BEB6112D6F7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8186CF63-C057-438A-A3E9-87DEBE241B50}.Debug|x86.ActiveCfg = Debug|x86
{8186CF63-C057-438A-A3E9-87DEBE241B50}.Debug|x86.Build.0 = Debug|x86
{8186CF63-C057-438A-A3E9-87DEBE241B50}.Release|x86.ActiveCfg = Release|x86
{8186CF63-C057-438A-A3E9-87DEBE241B50}.Release|x86.Build.0 = Release|x86
{E4EC5B34-CC40-4D86-9976-1BEB6112D6F7}.Debug|x86.ActiveCfg = Debug|x86
{E4EC5B34-CC40-4D86-9976-1BEB6112D6F7}.Release|x86.ActiveCfg = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Binary file added SuperAwesomeMagnetGame.suo
Binary file not shown.
65 changes: 65 additions & 0 deletions SuperAwesomeMagnetGame/Background.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

namespace SuperAwesomeMagnetGame
{
class Background : Sprite
{
public Background(Texture2D image, Vector2 position,
Point frameSize, int collisionOffset, Point currentFrame,
Point sheetSize, Vector2 speed, int pointValue)
: base(image, position, frameSize, collisionOffset, currentFrame, sheetSize,
speed, pointValue) { }

public Background(Texture2D image, Vector2 position,
Point frameSize, int collisionOffset, Point currentFrame,
Point sheetSize, Vector2 speed, int pointValue, int millisecondsPerFrame)
: base(image, position, frameSize, collisionOffset, currentFrame, sheetSize,
speed, pointValue, millisecondsPerFrame) { }

public Vector2 Position
{
get
{
return position;
}
set
{
position = value;
}
}

public Point FrameSize
{
get
{
return frameSize;
}
}

public override Vector2 Direction
{
get
{
return speed;
}
}

public override void Update(GameTime gameTime, Rectangle clientBounds)
{
position += speed;
}

public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
{
spriteBatch.Draw(image, position, new Rectangle(currentFrame.X * frameSize.X,
currentFrame.Y * frameSize.Y, frameSize.X, frameSize.Y), Color.White, 0,
new Vector2(25, 25), 1f, SpriteEffects.None, 0.1f);
}
}
}
39 changes: 39 additions & 0 deletions SuperAwesomeMagnetGame/BlockSprite.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace SuperAwesomeMagnetGame
{
class BlockSprite : Sprite
{
public BlockSprite(Texture2D image, Vector2 position,
Point frameSize, int collisionOffset, Point currentFrame,
Point sheetSize, Vector2 speed, int pointValue)
: base(image, position, frameSize, collisionOffset, currentFrame, sheetSize,
speed, pointValue) { }

public BlockSprite(Texture2D image, Vector2 position,
Point frameSize, int collisionOffset, Point currentFrame,
Point sheetSize, Vector2 speed, int pointValue, int millisecondsPerFrame)
: base(image, position, frameSize, collisionOffset, currentFrame, sheetSize,
speed, pointValue, millisecondsPerFrame) { }

public override Vector2 Direction
{
get { return speed; }
}

public override void Update(GameTime gameTime, Rectangle clientBounds)
{
position += Direction;

if (position.X < 0) speed.X = -speed.X;
if (position.Y < 0) speed.Y = -speed.Y;
if (position.X > 1024 - frameSize.X) speed.X = -speed.X;
if (position.Y > 768 - frameSize.Y) speed.Y = -speed.Y;
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added SuperAwesomeMagnetGame/Content/Audio/HitSound.wav
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
60 changes: 60 additions & 0 deletions SuperAwesomeMagnetGame/Content/Fonts/Arial.spritefont
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file contains an xml description of a font, and will be read by the XNA
Framework Content Pipeline. Follow the comments to customize the appearance
of the font in your game, and to change the characters which are available to draw
with.
-->
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
<Asset Type="Graphics:FontDescription">

<!--
Modify this string to change the font that will be imported.
-->
<FontName>Kootenay</FontName>

<!--
Size is a float value, measured in points. Modify this value to change
the size of the font.
-->
<Size>14</Size>

<!--
Spacing is a float value, measured in pixels. Modify this value to change
the amount of spacing in between characters.
-->
<Spacing>0</Spacing>

<!--
UseKerning controls the layout of the font. If this value is true, kerning information
will be used when placing characters.
-->
<UseKerning>true</UseKerning>

<!--
Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic",
and "Bold, Italic", and are case sensitive.
-->
<Style>Regular</Style>

<!--
If you uncomment this line, the default character will be substituted if you draw
or measure text that contains characters which were not included in the font.
-->
<!-- <DefaultCharacter>*</DefaultCharacter> -->

<!--
CharacterRegions control what letters are available in the font. Every
character from Start to End will be built and made available for drawing. The
default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin
character set. The characters are ordered according to the Unicode standard.
See the documentation for more information.
-->
<CharacterRegions>
<CharacterRegion>
<Start>&#32;</Start>
<End>&#126;</End>
</CharacterRegion>
</CharacterRegions>
</Asset>
</XnaContent>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 SuperAwesomeMagnetGame/Content/Images/Block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit aa838a0

Please sign in to comment.