Browse Source

Added GooCursor sample

kjpou1 13 years ago
parent
commit
ad5d37ae5b

+ 78 - 0
Samples/Linux/GooCursor/GooCursor.csproj

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>10.0.0</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>GooCursor</RootNamespace>
+    <AssemblyName>GooCursor</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ItemGroup>
+    <Reference Include="System" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.Linux.csproj">
+      <Project>{35253CE1-C864-4CD3-8249-4D1319748E8F}</Project>
+      <Name>MonoGame.Framework.Linux</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\..\MacOS\GooCursor\Cursor.cs">
+      <Link>Cursor.cs</Link>
+    </Compile>
+    <Compile Include="..\..\MacOS\GooCursor\Game1.cs">
+      <Link>Game1.cs</Link>
+    </Compile>
+    <Compile Include="Program.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\MacOS\GooCursor\Game.ico">
+      <Link>Game.ico</Link>
+    </None>
+    <None Include="..\..\MacOS\GooCursor\GameThumbnail.png">
+      <Link>GameThumbnail.png</Link>
+    </None>
+    <None Include="..\..\MacOS\GooCursor\Readme.md">
+      <Link>Readme.md</Link>
+    </None>
+    <None Include="..\..\MacOS\GooCursor\Content\SimpleFont.spritefont">
+      <Link>Content\SimpleFont.spritefont</Link>
+    </None>
+    <None Include="..\..\MacOS\GooCursor\Content\cursor.bmp">
+      <Link>Content\cursor.bmp</Link>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="..\..\MacOS\GooCursor\Content\SimpleFont.xnb">
+      <Link>Content\SimpleFont.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\MacOS\GooCursor\Content\cursor.xnb">
+      <Link>Content\cursor.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+</Project>

+ 19 - 0
Samples/Linux/GooCursor/Program.cs

@@ -0,0 +1,19 @@
+using System;
+
+namespace GooCursor
+{
+    static class Program
+    {
+        /// <summary>
+        /// The main entry point for the application.
+        /// </summary>
+        static void Main(string[] args)
+        {
+            using (Game1 game = new Game1())
+            {
+                game.Run();
+            }
+        }
+    }
+}
+

+ 2 - 2
Samples/MacOS/GooCursor/Cursor.cs

@@ -244,12 +244,12 @@ namespace GooCursor
             position.X = mouseState.X;
             position.Y = mouseState.Y;
             #endif
-
+			Console.WriteLine(position);
             // modify position using delta, the CursorSpeed, and
             // the elapsed game time.
             position += deltaMovement * CursorSpeed *
                 (float)gameTime.ElapsedGameTime.TotalSeconds;
-
+			
 
             #if XBOX360
             // clamp the cursor position to the viewport, so that it can't move off the

+ 23 - 1
Samples/MonoGame.Samples.Linux.sln

@@ -37,6 +37,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Samples.RobotRampa
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ParticleSample", "Linux\ParticleSample\ParticleSample.csproj", "{EB1F36EC-5DB8-41AC-AB99-E9337239A9F9}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GooCursor", "Linux\GooCursor\GooCursor.csproj", "{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -371,6 +373,26 @@ Global
 		{D0E05092-60B2-47FF-B924-D5CDED0C0DD1}.Release|Mixed Platforms.Build.0 = Release|x86
 		{D0E05092-60B2-47FF-B924-D5CDED0C0DD1}.Release|x86.ActiveCfg = Release|x86
 		{D0E05092-60B2-47FF-B924-D5CDED0C0DD1}.Release|x86.Build.0 = Release|x86
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Debug|iPhone.Build.0 = Debug|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Debug|x86.Build.0 = Debug|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Release|Any CPU.Build.0 = Release|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Release|iPhone.ActiveCfg = Release|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Release|iPhone.Build.0 = Release|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Release|x86.ActiveCfg = Release|Any CPU
+		{EA7CF275-795B-4385-80AA-C41DA3B9B0F9}.Release|x86.Build.0 = Release|Any CPU
 		{EB1F36EC-5DB8-41AC-AB99-E9337239A9F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{EB1F36EC-5DB8-41AC-AB99-E9337239A9F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{EB1F36EC-5DB8-41AC-AB99-E9337239A9F9}.Debug|iPhone.ActiveCfg = Debug|Any CPU
@@ -400,7 +422,7 @@ Global
 		{86A219E2-C8F0-452B-B762-C69D5BB07C98} = {0407BF89-E721-419F-B663-8436D9E83495}
 	EndGlobalSection
 	GlobalSection(MonoDevelopProperties) = preSolution
-		StartupItem = Linux\Draw2D\MonoGame.Samples.Draw2D.Linux.csproj
+		StartupItem = Linux\GooCursor\GooCursor.csproj
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE