Commits

Anonymous committed 73acf7a

First commit

Comments (0)

Files changed (12)

+syntax: glob
+*/obj/*
+*/bin/*
+tools/*
+*.user
+*.suo
+*/_ReSharper*/
+src/packages/*
+*.docstates
+build/*
+StyleCop.Cache
+*.vs10x
+*.orig
+*.dotCover
+*.csproj.Debug.cachefile

CollisionDetection.sln

+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CollisionDetection", "CollisionDetection\CollisionDetection\CollisionDetection.csproj", "{64A25808-DCD7-435D-AFD8-9F7E28B668C4}"
+EndProject
+Project("{96E2B04D-8817-42C6-938A-82C39BA4D311}") = "CollisionDetectionContent", "CollisionDetection\CollisionDetectionContent\CollisionDetectionContent.contentproj", "{D02EE50C-1568-44C7-A509-E90BD7AD0B20}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|x86 = Debug|x86
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{64A25808-DCD7-435D-AFD8-9F7E28B668C4}.Debug|x86.ActiveCfg = Debug|x86
+		{64A25808-DCD7-435D-AFD8-9F7E28B668C4}.Debug|x86.Build.0 = Debug|x86
+		{64A25808-DCD7-435D-AFD8-9F7E28B668C4}.Release|x86.ActiveCfg = Release|x86
+		{64A25808-DCD7-435D-AFD8-9F7E28B668C4}.Release|x86.Build.0 = Release|x86
+		{D02EE50C-1568-44C7-A509-E90BD7AD0B20}.Debug|x86.ActiveCfg = Debug|x86
+		{D02EE50C-1568-44C7-A509-E90BD7AD0B20}.Release|x86.ActiveCfg = Release|x86
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

CollisionDetection/CollisionDetection/CollisionDetection.csproj

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectGuid>{64A25808-DCD7-435D-AFD8-9F7E28B668C4}</ProjectGuid>
+    <ProjectTypeGuids>{6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <OutputType>WinExe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>CollisionDetection</RootNamespace>
+    <AssemblyName>CollisionDetection</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+    <XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
+    <XnaPlatform>Windows</XnaPlatform>
+    <XnaProfile>HiDef</XnaProfile>
+    <XnaCrossPlatformGroupID>8536ee46-ed83-4700-b831-9b8c33a625e3</XnaCrossPlatformGroupID>
+    <XnaOutputType>Game</XnaOutputType>
+    <ApplicationIcon>Game.ico</ApplicationIcon>
+    <Thumbnail>GameThumbnail.png</Thumbnail>
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\x86\Debug</OutputPath>
+    <DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <NoStdLib>true</NoStdLib>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <PlatformTarget>x86</PlatformTarget>
+    <XnaCompressContent>false</XnaCompressContent>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\x86\Release</OutputPath>
+    <DefineConstants>TRACE;WINDOWS</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <NoStdLib>true</NoStdLib>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <PlatformTarget>x86</PlatformTarget>
+    <XnaCompressContent>true</XnaCompressContent>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.GamerServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Xact, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Video, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Avatar, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="mscorlib">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="System">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="System.Xml">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="System.Core">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="System.Net">
+      <Private>False</Private>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="CollisionDetectionLab.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Game.ico" />
+    <Content Include="GameThumbnail.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\CollisionDetectionContent\CollisionDetectionContent.contentproj">
+      <Name>CollisionDetectionContent</Name>
+      <XnaReferenceType>Content</XnaReferenceType>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
+      <Visible>False</Visible>
+      <ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Xna.Framework.4.0">
+      <Visible>False</Visible>
+      <ProductName>Microsoft XNA Framework Redistributable 4.0</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" />
+  <!--
+      To modify your build process, add your task inside one of the targets below and uncomment it. 
+      Other similar extension points exist, see Microsoft.Common.targets.
+      <Target Name="BeforeBuild">
+      </Target>
+      <Target Name="AfterBuild">
+      </Target>
+    -->
+</Project>

CollisionDetection/CollisionDetection/CollisionDetectionLab.cs

+using System;
+using System.Collections.Generic;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+
+namespace CollisionDetection
+{
+	public class CollisionDetectionLab : Game
+	{
+		private GraphicsDeviceManager _graphics;
+		private SpriteBatch _spriteBatch;
+		private Texture2D _turretTexture;
+		private Texture2D _bulletTexture;
+		private Vector2 _turretPosition;
+		private Rectangle _barRectangle;
+		private float _barRotation;
+		private Vector2 _barOrigin;
+		private Texture2D _barTexture;
+		private float _barRotationSpeed = 0.03f;
+		private List<Vector2> _bullets = new List<Vector2>();
+		private KeyboardState _previousKeyboardState;
+		private Vector2 _screenCenter;
+		private Rectangle _barBoundingBox;
+		private Texture2D _whiteTexture;
+		private Color[] _barTextureData;
+		private Color[] _bulletTextureData;
+
+
+		public CollisionDetectionLab()
+		{
+			_graphics = new GraphicsDeviceManager(this);
+			Content.RootDirectory = "Content";
+		}
+
+		protected override void Initialize()
+		{
+			base.Initialize();
+
+			_turretPosition = new Vector2((GraphicsDevice.Viewport.Width - _turretTexture.Width) / 2, GraphicsDevice.Viewport.Height - 50);
+			_barRectangle = new Rectangle(0, 0, _barTexture.Width, _barTexture.Height);
+			_barOrigin = new Vector2(_barTexture.Width / 2, _barTexture.Height / 2);
+			_screenCenter = new Vector2(GraphicsDevice.Viewport.Width / 2, GraphicsDevice.Viewport.Height / 2);
+		}
+
+		protected override void LoadContent()
+		{
+			_spriteBatch = new SpriteBatch(GraphicsDevice);
+
+			_turretTexture = Content.Load<Texture2D>("turret");
+			_bulletTexture = Content.Load<Texture2D>("bullet");
+			_barTexture = Content.Load<Texture2D>("bar");
+
+			_barTextureData = new Color[_barTexture.Width * _barTexture.Height];
+			_barTexture.GetData(_barTextureData);
+
+			_bulletTextureData = new Color[_bulletTexture.Width * _bulletTexture.Height];
+			_bulletTexture.GetData(_bulletTextureData);
+
+			_whiteTexture = new Texture2D(GraphicsDevice, 1, 1);
+			_whiteTexture.SetData(new[] { Color.White });
+		}
+
+		protected override void UnloadContent()
+		{
+		}
+
+		protected override void Update(GameTime gameTime)
+		{
+			if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
+				Exit();
+
+			var keyboardState = Keyboard.GetState();
+
+			if (keyboardState.IsKeyDown(Keys.Left))
+				_turretPosition.X -= 5;
+			else if (keyboardState.IsKeyDown(Keys.Right))
+				_turretPosition.X += 5;
+
+			if (keyboardState.IsKeyDown(Keys.Space) && _previousKeyboardState.IsKeyDown(Keys.Space) == false)
+				_bullets.Add(new Vector2(_turretPosition.X + _turretTexture.Width / 2 - _bulletTexture.Width / 2, _turretPosition.Y));
+
+			UpdateBullets();
+			CheckForCollisions();
+
+			_previousKeyboardState = keyboardState;
+			_barRotation += _barRotationSpeed;
+
+			base.Update(gameTime);
+		}
+
+		private void UpdateBullets()
+		{
+			for (var i = _bullets.Count - 1; i >= 0; i--)
+			{
+				_bullets[i] = new Vector2(_bullets[i].X, _bullets[i].Y - 5);
+
+				if (_bullets[i].Y < 0)
+				{
+					_bullets.RemoveAt(i);
+				}
+			}
+		}
+
+		private void CheckForCollisions()
+		{
+			var barTransform = GetBarTransformationMatrix();
+
+			_barBoundingBox = CalculateBoundingRectangle(_barRectangle, barTransform);
+
+			for (var i = _bullets.Count - 1; i >= 0; i--)
+			{
+				var bulletBoundingBox = new Rectangle((int) _bullets[i].X, (int) _bullets[i].Y, 
+					_bulletTexture.Width, _bulletTexture.Height);
+
+				if (HasBulletCollidedWithBarBoundingBox(bulletBoundingBox))
+				{
+					var bulletTransform = Matrix.CreateTranslation(new Vector3(_bullets[i], 0));
+
+					if (IntersectPixels_Slow(barTransform, _barTexture.Width, _barTexture.Height, _barTextureData,
+					                    bulletTransform, _bulletTexture.Width, _bulletTexture.Height, _bulletTextureData))
+						_bullets.RemoveAt(i);
+				}
+			}
+		}
+
+		private Matrix GetBarTransformationMatrix()
+		{
+			// Todo:
+			// Create a transformation matrix that represents the spinning bar's rotation and position on screen. The matrix
+			//  should first perform a translation so that the bar is centered around the origin, then it should rotate the bar by
+			//  _barRotation radians, and finally it should translate the bar to the center of the screen, the value of which
+			//  has been stored in the _screenCenter field, for your convenience. Return the completed transformation matrix.
+
+			// Hint:
+			// Remember that multiple matrix transformations can be combined into a single matrix simply by multiplying them
+			//  together. Be careful though, as the order that you multiply the matrices in can affect the result. For example,
+			//  a rotation matrix multipled by a translation matrix is different to the same translation matrix by the rotation
+			//  matrix.
+
+			return Matrix.Identity;
+		}
+
+		private bool HasBulletCollidedWithBarBoundingBox(Rectangle bulletBoundingBox)
+		{
+			// Todo:
+			// Finish this method so that it returns true when the bulletBoundingBox rectangle intersects with the _barBoundingBox
+			//  rectangle.
+
+			return false;
+		}
+
+		protected override void Draw(GameTime gameTime)
+		{
+			GraphicsDevice.Clear(Color.CornflowerBlue);
+
+			_spriteBatch.Begin();
+
+			_spriteBatch.Draw(_turretTexture, _turretPosition, Color.White);
+			_spriteBatch.Draw(_barTexture,
+							  _screenCenter,
+							  null,
+							  Color.White,
+							  _barRotation,
+							  _barOrigin,
+							  1,
+							  SpriteEffects.None,
+							  0);
+
+			foreach (var bullet in _bullets)
+			{
+				_spriteBatch.Draw(_bulletTexture, bullet, Color.White);
+			}
+
+			_spriteBatch.Draw(_whiteTexture, new Rectangle(_barBoundingBox.X, _barBoundingBox.Y, 1, _barBoundingBox.Height), Color.White);
+			_spriteBatch.Draw(_whiteTexture, new Rectangle(_barBoundingBox.X, _barBoundingBox.Y, _barBoundingBox.Width, 1), Color.White);
+			_spriteBatch.Draw(_whiteTexture, new Rectangle(_barBoundingBox.X + _barBoundingBox.Width, _barBoundingBox.Y, 1, _barBoundingBox.Height), Color.White);
+			_spriteBatch.Draw(_whiteTexture, new Rectangle(_barBoundingBox.X, _barBoundingBox.Y + _barBoundingBox.Height, _barBoundingBox.Width, 1), Color.White);
+
+			_spriteBatch.End();
+
+			base.Draw(gameTime);
+		}
+
+		public static Rectangle CalculateBoundingRectangle(Rectangle rectangle, Matrix transform)
+		{
+			var leftTop = new Vector2(rectangle.Left, rectangle.Top);
+			var rightTop = new Vector2(rectangle.Right, rectangle.Top);
+			var leftBottom = new Vector2(rectangle.Left, rectangle.Bottom);
+			var rightBottom = new Vector2(rectangle.Right, rectangle.Bottom);
+
+			// Todo:
+			// Transform the leftTop, rightTop, leftBottom, and rightBottom vectors by the transform parameter.
+
+			// Hint:
+			// The Vector2 class has a static method called Transform that you can use to transform a vector by a matrix.
+
+
+
+			var min = Vector2.Min(Vector2.Min(leftTop, rightTop), Vector2.Min(leftBottom, rightBottom));
+			var max = Vector2.Max(Vector2.Max(leftTop, rightTop), Vector2.Max(leftBottom, rightBottom));
+
+			return new Rectangle((int)min.X, (int)min.Y, (int)(max.X - min.X), (int)(max.Y - min.Y));
+		}
+
+		public static bool IntersectPixels_Slow(
+			Matrix transformA, int widthA, int heightA, Color[] dataA,
+			Matrix transformB, int widthB, int heightB, Color[] dataB)
+		{
+			// Todo:
+			// Calculate a transformation matrix that will transform a point from A's local space into B's local space.
+			// To do this, multiply A's transformation matrix by the inverse of B's transformation matrix.
+
+			var transformAToB = transformA * Matrix.Invert(transformB);
+
+			for (var yA = 0; yA < heightA; yA++)
+			{
+				for (var xA = 0; xA < widthA; xA++)
+				{
+					// Todo:
+					// Using the transformation matrix you calculated above, transform the point xA, yA into B's local space,
+					//  and store the result in the local variable positionInB.
+
+					var positionInB = Vector2.Zero;
+
+					var xB = (int)Math.Round(positionInB.X);
+					var yB = (int)Math.Round(positionInB.Y);
+
+					if (xB >= 0 && xB < widthB && yB >= 0 && yB < heightB)
+					{
+						var colorA = dataA[xA + yA * widthA];
+						var colorB = dataB[xB + yB * widthB];
+
+						if (colorA.A != 0 && colorB.A != 0)
+						{
+							return true;
+						}
+					}
+				}
+			}
+
+			return false;
+		}
+	}
+}

CollisionDetection/CollisionDetection/Game.ico

Added
New image

CollisionDetection/CollisionDetection/GameThumbnail.png

Added
New image

CollisionDetection/CollisionDetection/Program.cs

+using System;
+
+namespace CollisionDetection
+{
+#if WINDOWS || XBOX
+    static class Program
+    {
+        /// <summary>
+        /// The main entry point for the application.
+        /// </summary>
+        static void Main(string[] args)
+        {
+            using (CollisionDetectionLab game = new CollisionDetectionLab())
+            {
+                game.Run();
+            }
+        }
+    }
+#endif
+}
+

CollisionDetection/CollisionDetection/Properties/AssemblyInfo.cs

+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("CollisionDetection")]
+[assembly: AssemblyProduct("CollisionDetection")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyCopyright("Copyright ©  2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type. Only Windows
+// assemblies support COM.
+[assembly: ComVisible(false)]
+
+// On Windows, the following GUID is for the ID of the typelib if this
+// project is exposed to COM. On other platforms, it unique identifies the
+// title storage container when deploying this assembly to the device.
+[assembly: Guid("3ccc009b-2475-4e45-a99b-c1d706b8d530")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]

CollisionDetection/CollisionDetectionContent/Bar.png

Added
New image

CollisionDetection/CollisionDetectionContent/CollisionDetectionContent.contentproj

+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectGuid>{D02EE50C-1568-44C7-A509-E90BD7AD0B20}</ProjectGuid>
+    <ProjectTypeGuids>{96E2B04D-8817-42c6-938A-82C39BA4D311};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
+    <OutputPath>bin\$(Platform)\$(Configuration)</OutputPath>
+    <ContentRootDirectory>Content</ContentRootDirectory>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+    <PlatformTarget>x86</PlatformTarget>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+    <PlatformTarget>x86</PlatformTarget>
+  </PropertyGroup>
+  <PropertyGroup>
+    <RootNamespace>CollisionDetectionContent</RootNamespace>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.EffectImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.FBXImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.TextureImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.XImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.AudioImporters, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.VideoImporters, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="bullet.tga">
+      <Name>bullet</Name>
+      <Importer>TextureImporter</Importer>
+      <Processor>TextureProcessor</Processor>
+    </Compile>
+    <Compile Include="turret.tga">
+      <Name>turret</Name>
+      <Importer>TextureImporter</Importer>
+      <Processor>TextureProcessor</Processor>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Bar.png">
+      <Name>Bar</Name>
+      <Importer>TextureImporter</Importer>
+      <Processor>TextureProcessor</Processor>
+    </Compile>
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" />
+  <!--  To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

CollisionDetection/CollisionDetectionContent/bullet.tga

Added
New image

CollisionDetection/CollisionDetectionContent/turret.tga

Added
New image