Skip to content

Commit

Permalink
Merge branch 'nire'
Browse files Browse the repository at this point in the history
Conflicts:
	Aura.sln
	Aura/Aura/MenuManager.cs
  • Loading branch information
thakyZ committed Mar 31, 2015
2 parents 6a8b120 + fe1e378 commit 0df087f
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 10 deletions.
19 changes: 19 additions & 0 deletions Aura.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,35 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual C# Express 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuraContent", "Aura\AuraContent\AuraContent.contentproj", "{B9E56039-B1BB-4327-88F6-2ACF7EE07641}"
EndProject
<<<<<<< HEAD
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VoidEngine", "Aura\VoidEngine\VoidEngine\VoidEngine.csproj", "{CF9853A6-A986-4FAD-A2E6-6FE5307EDF2F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aura", "Aura\Aura\Aura.csproj", "{33772B92-8B94-49AB-9006-3C8EE0F34FC1}"
EndProject
=======
>>>>>>> nire
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
<<<<<<< HEAD
=======
{33772B92-8B94-49AB-9006-3C8EE0F34FC1}.Debug|Any CPU.ActiveCfg = Debug|x86
{33772B92-8B94-49AB-9006-3C8EE0F34FC1}.Debug|x86.ActiveCfg = Debug|x86
{33772B92-8B94-49AB-9006-3C8EE0F34FC1}.Debug|x86.Build.0 = Debug|x86
{33772B92-8B94-49AB-9006-3C8EE0F34FC1}.Release|Any CPU.ActiveCfg = Release|x86
{33772B92-8B94-49AB-9006-3C8EE0F34FC1}.Release|x86.ActiveCfg = Release|x86
{33772B92-8B94-49AB-9006-3C8EE0F34FC1}.Release|x86.Build.0 = Release|x86
{B9E56039-B1BB-4327-88F6-2ACF7EE07641}.Debug|Any CPU.ActiveCfg = Debug|x86
>>>>>>> nire
{B9E56039-B1BB-4327-88F6-2ACF7EE07641}.Debug|x86.ActiveCfg = Debug|x86
{B9E56039-B1BB-4327-88F6-2ACF7EE07641}.Release|Any CPU.ActiveCfg = Release|x86
{B9E56039-B1BB-4327-88F6-2ACF7EE07641}.Release|x86.ActiveCfg = Release|x86
<<<<<<< HEAD
{CF9853A6-A986-4FAD-A2E6-6FE5307EDF2F}.Debug|x86.ActiveCfg = Debug|x86
{CF9853A6-A986-4FAD-A2E6-6FE5307EDF2F}.Debug|x86.Build.0 = Debug|x86
{CF9853A6-A986-4FAD-A2E6-6FE5307EDF2F}.Release|x86.ActiveCfg = Release|x86
Expand All @@ -22,6 +39,8 @@ Global
{33772B92-8B94-49AB-9006-3C8EE0F34FC1}.Debug|x86.Build.0 = Debug|x86
{33772B92-8B94-49AB-9006-3C8EE0F34FC1}.Release|x86.ActiveCfg = Release|x86
{33772B92-8B94-49AB-9006-3C8EE0F34FC1}.Release|x86.Build.0 = Release|x86
=======
>>>>>>> nire
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
8 changes: 4 additions & 4 deletions Aura/Aura/Aura.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@
<Reference Include="System.Net">
<Private>False</Private>
</Reference>
<Reference Include="VoidEngine, Version=0.0.1.2, Culture=neutral, processorArchitecture=x86">
<HintPath>.\VoidEngine.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Enemy.cs" />
Expand All @@ -129,10 +133,6 @@
<Content Include="GameThumbnail.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VoidEngine\VoidEngine\VoidEngine.csproj">
<Project>{cf9853a6-a986-4fad-a2e6-6fe5307edf2f}</Project>
<Name>VoidEngine</Name>
</ProjectReference>
<ProjectReference Include="..\AuraContent\AuraContent.contentproj">
<Name>AuraContent %28Content%29</Name>
<XnaReferenceType>Content</XnaReferenceType>
Expand Down
4 changes: 2 additions & 2 deletions Aura/Aura/GameManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ protected override void LoadContent()
MovementKeys.Add(Keys.Q);

_Mana = new Player.Mana(100, 5000, 100);
player = new Player(new Vector2(25, (myGame.WindowSize.Y - playerAnimationSetList[0].frameSize.Y) - 75), MovementKeys, 1.75f, _Mana, Color.White, playerAnimationSetList, myGame);
player = new Player(new Vector2(25, (myGame.WindowSize.Y - playerAnimationSetList[0].frameSize.Y) - 75), MovementKeys, 2f, _Mana, Color.White, playerAnimationSetList, myGame);

bhEnemy = new Enemy(new Vector2(0, 0), 0, Enemy.MovementType.BOSSHEAD, Color.White, bhEnemyAnimationSetList, player, platformRectangles, mapSegments);
bflEnemy = new Enemy(new Vector2(0, 0), 2.75f, Enemy.MovementType.BOSSBOUNCE, Color.White, bflEnemyAnimationSetList, player, platformRectangles, mapSegments);
Expand Down Expand Up @@ -801,7 +801,7 @@ public override void Draw(GameTime gameTime)
spriteBatch.Begin();
{
// To debug variables.
debugLabel.Draw(gameTime, spriteBatch);
//debugLabel.Draw(gameTime, spriteBatch);
}
spriteBatch.End();

Expand Down
4 changes: 4 additions & 0 deletions Aura/Aura/MenuManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ protected override void LoadContent()
background = Game.Content.Load<Texture2D>(@"images\screens\menu");
buttonTexture = Game.Content.Load<Texture2D>(@"images\gui\button");
titleSong = Game.Content.Load<Song>(@"sounds\music\title");
<<<<<<< HEAD
=======

>>>>>>> nire
animationSpriteList.Add(new Sprite.AnimationSet("IDLE", buttonTexture, new Point(170, 46), new Point(0, 0), new Point(0, 0), 0));
animationSpriteList.Add(new Sprite.AnimationSet("HOVER", buttonTexture, new Point(170, 46), new Point(1, 0), new Point(170, 0), 0));
animationSpriteList.Add(new Sprite.AnimationSet("PRESSED", buttonTexture, new Point(170, 46), new Point(2, 0), new Point(340, 0), 0));
Expand Down
9 changes: 5 additions & 4 deletions Aura/Aura/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,8 @@ protected virtual void InputMethod(List<Keys> keyList)
if ((myGame.keyboardState.IsKeyDown(keyList[4]) || myGame.keyboardState.IsKeyDown(keyList[1])) && (!isJumping && !canFall))
{
isJumping = true;
Position.Y -= GravityForce * 5.5f;
//Position.Y -= GravityForce * 5.5f;
Direction.Y = -DefaultGravityForce;
}
if (myGame.keyboardState.IsKeyDown(keyList[0]))
{
Expand Down Expand Up @@ -564,8 +565,8 @@ protected virtual void UpdateGravity()
{
if (GravityForce > -DefaultGravityForce)
{
Direction.Y = -GravityForce;
GravityForce -= 0.03f;
Direction.Y -= GravityForce;
GravityForce -= 0.07f;
}
if (GravityForce <= 0f)
{
Expand All @@ -576,7 +577,7 @@ protected virtual void UpdateGravity()

if (!isJumping)
{
Direction.Y = GravityForce;
Direction.Y += GravityForce;
GravityForce += 0.10f;
}

Expand Down
Binary file added Aura/Aura/VoidEngine.dll
Binary file not shown.
100 changes: 100 additions & 0 deletions Aura/VoidEngine/VoidEngine/Pathing.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace VoidEngine
{
public static class Pathing
{
public static Vector2 aStar(Point source, Point target, List<string> map)
{
int mapWidth = map[0].Length;
int mapHeight = map.Count;
List<Vector3> pathGrid = new List<Vector3>();
bool[,] checkedPath = new bool[mapWidth, mapHeight];
pathGrid.Add(new Vector3(target.X, target.Y, 0));
bool pathFound = false;
int i = 0;

while (i < pathGrid.Count)
{

if (pathGrid[i].Y > 0)
{
if (pathGrid[i].Y - 1 == source.Y && pathGrid[i].X == source.X)
{
checkedPath[(int)pathGrid[i].X, (int)pathGrid[i].Y - 1] = true;
pathFound = true;
return new Vector2(0, 1);
}
else if (map[(int)pathGrid[i].Y - 1][(int)pathGrid[i].X] == '.' && !checkedPath[(int)pathGrid[i].X, (int)pathGrid[i].Y - 1])
{
pathGrid.Add(new Vector3(pathGrid[i].X, pathGrid[i].Y - 1, pathGrid[i].Z));
checkedPath[(int)pathGrid[i].X, (int)pathGrid[i].Y - 1] = true;
}
}


if (pathGrid[i].Y < mapHeight - 1 && !pathFound)
{
if (pathGrid[i].Y + 1 == source.Y && pathGrid[i].X == source.X)
{
checkedPath[(int)pathGrid[i].X, (int)pathGrid[i].Y + 1] = true;
pathFound = true;
return new Vector2(0, -1);
}
else if (map[(int)pathGrid[i].Y + 1][(int)pathGrid[i].X] == '.' && !checkedPath[(int)pathGrid[i].X, (int)pathGrid[i].Y + 1])
{
pathGrid.Add(new Vector3(pathGrid[i].X, pathGrid[i].Y + 1, pathGrid[i].Z));
checkedPath[(int)pathGrid[i].X, (int)pathGrid[i].Y + 1] = true;
}
}


if (pathGrid[i].X > 0 && !pathFound)
{
if (pathGrid[i].Y == source.Y && pathGrid[i].X - 1 == source.X)
{
checkedPath[(int)pathGrid[i].X - 1, (int)pathGrid[i].Y] = true;
pathFound = true;
return new Vector2(1, 0);
}
else if (map[(int)pathGrid[i].Y][(int)pathGrid[i].X - 1] == '.' && !checkedPath[(int)pathGrid[i].X - 1, (int)pathGrid[i].Y])
{
pathGrid.Add(new Vector3(pathGrid[i].X - 1, pathGrid[i].Y, pathGrid[i].Z));
checkedPath[(int)pathGrid[i].X - 1, (int)pathGrid[i].Y] = true;
}
}



if (pathGrid[i].X < mapWidth - 1 && !pathFound)
{
if (pathGrid[i].Y == source.Y && pathGrid[i].X + 1 == source.X)
{
checkedPath[(int)pathGrid[i].X + 1, (int)pathGrid[i].Y] = true;
pathFound = true;
return new Vector2(-1, 0);
}
else if (map[(int)pathGrid[i].Y][(int)pathGrid[i].X + 1] == '.' && !checkedPath[(int)pathGrid[i].X + 1, (int)pathGrid[i].Y])
{
pathGrid.Add(new Vector3(pathGrid[i].X + 1, pathGrid[i].Y, pathGrid[i].Z));
checkedPath[(int)pathGrid[i].X + 1, (int)pathGrid[i].Y] = true;
}
}

i++;
}

return Vector2.Zero;
}
}
}
1 change: 1 addition & 0 deletions Aura/VoidEngine/VoidEngine/VoidEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
<Compile Include="MapHelper.cs" />
<Compile Include="ParallaxBackground.cs" />
<Compile Include="GUI.cs" />
<Compile Include="Pathing.cs" />
<Compile Include="RectangleHelper.cs" />
<Compile Include="Sprite.cs" />
<Compile Include="VoidEngine.cs" />
Expand Down

0 comments on commit 0df087f

Please sign in to comment.