summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Penguloon.sln27
-rw-r--r--Penguloon/Activity1.cs27
-rw-r--r--Penguloon/Assets/AboutAssets.txt19
-rw-r--r--Penguloon/Content/Content.mgcb15
-rw-r--r--Penguloon/Game1.cs88
-rw-r--r--Penguloon/Penguloon.csproj100
-rw-r--r--Penguloon/Properties/AssemblyInfo.cs41
-rw-r--r--Penguloon/Resources/AboutResources.txt44
-rw-r--r--Penguloon/Resources/Drawable/Icon.pngbin0 -> 24313 bytes
-rw-r--r--Penguloon/Resources/Drawable/Splash.pngbin0 -> 33526 bytes
-rw-r--r--Penguloon/Resources/Resource.Designer.cs65
-rw-r--r--Penguloon/Resources/Values/Strings.xml5
-rw-r--r--Penguloon/Resources/Values/Styles.xml7
13 files changed, 438 insertions, 0 deletions
diff --git a/Penguloon.sln b/Penguloon.sln
new file mode 100644
index 0000000..94c6c87
--- /dev/null
+++ b/Penguloon.sln
@@ -0,0 +1,27 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.27004.2009
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Penguloon", "Penguloon\Penguloon.csproj", "{6C46FE18-F5D6-4255-A202-475C1AB5EDAE}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {6C46FE18-F5D6-4255-A202-475C1AB5EDAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6C46FE18-F5D6-4255-A202-475C1AB5EDAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6C46FE18-F5D6-4255-A202-475C1AB5EDAE}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {6C46FE18-F5D6-4255-A202-475C1AB5EDAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6C46FE18-F5D6-4255-A202-475C1AB5EDAE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6C46FE18-F5D6-4255-A202-475C1AB5EDAE}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {1E71D667-C944-4E28-9CF5-011D027E6691}
+ EndGlobalSection
+EndGlobal
diff --git a/Penguloon/Activity1.cs b/Penguloon/Activity1.cs
new file mode 100644
index 0000000..ac9aa1e
--- /dev/null
+++ b/Penguloon/Activity1.cs
@@ -0,0 +1,27 @@
+using Android.App;
+using Android.Content.PM;
+using Android.OS;
+using Android.Views;
+
+namespace Penguloon
+{
+ [Activity(Label = "Penguloon"
+ , MainLauncher = true
+ , Icon = "@drawable/icon"
+ , Theme = "@style/Theme.Splash"
+ , AlwaysRetainTaskState = true
+ , LaunchMode = Android.Content.PM.LaunchMode.SingleInstance
+ , ScreenOrientation = ScreenOrientation.FullUser
+ , ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenSize)]
+ public class Activity1 : Microsoft.Xna.Framework.AndroidGameActivity
+ {
+ protected override void OnCreate(Bundle bundle)
+ {
+ base.OnCreate(bundle);
+ var g = new Game1();
+ SetContentView((View)g.Services.GetService(typeof(View)));
+ g.Run();
+ }
+ }
+}
+
diff --git a/Penguloon/Assets/AboutAssets.txt b/Penguloon/Assets/AboutAssets.txt
new file mode 100644
index 0000000..ee39886
--- /dev/null
+++ b/Penguloon/Assets/AboutAssets.txt
@@ -0,0 +1,19 @@
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories) and given a Build Action of "AndroidAsset".
+
+These files will be deployed with you package and will be accessible using Android's
+AssetManager, like this:
+
+public class ReadAsset : Activity
+{
+ protected override void OnCreate (Bundle bundle)
+ {
+ base.OnCreate (bundle);
+
+ InputStream input = Assets.Open ("my_asset.txt");
+ }
+}
+
+Additionally, some Android functions will automatically load asset files:
+
+Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); \ No newline at end of file
diff --git a/Penguloon/Content/Content.mgcb b/Penguloon/Content/Content.mgcb
new file mode 100644
index 0000000..895694b
--- /dev/null
+++ b/Penguloon/Content/Content.mgcb
@@ -0,0 +1,15 @@
+
+#----------------------------- Global Properties ----------------------------#
+
+/outputDir:bin/$(Platform)
+/intermediateDir:obj/$(Platform)
+/platform:Android
+/config:
+/profile:Reach
+/compress:False
+
+#-------------------------------- References --------------------------------#
+
+
+#---------------------------------- Content ---------------------------------#
+
diff --git a/Penguloon/Game1.cs b/Penguloon/Game1.cs
new file mode 100644
index 0000000..b77d9c4
--- /dev/null
+++ b/Penguloon/Game1.cs
@@ -0,0 +1,88 @@
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+
+namespace Penguloon
+{
+ /// <summary>
+ /// This is the main type for your game.
+ /// </summary>
+ public class Game1 : Game
+ {
+ GraphicsDeviceManager graphics;
+ SpriteBatch spriteBatch;
+
+ public Game1()
+ {
+ graphics = new GraphicsDeviceManager(this);
+ Content.RootDirectory = "Content";
+
+ graphics.IsFullScreen = true;
+ graphics.PreferredBackBufferWidth = 800;
+ graphics.PreferredBackBufferHeight = 480;
+ graphics.SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight;
+ }
+
+ /// <summary>
+ /// Allows the game to perform any initialization it needs to before starting to run.
+ /// This is where it can query for any required services and load any non-graphic
+ /// related content. Calling base.Initialize will enumerate through any components
+ /// and initialize them as well.
+ /// </summary>
+ protected override void Initialize()
+ {
+ // TODO: Add your initialization logic here
+
+ base.Initialize();
+ }
+
+ /// <summary>
+ /// LoadContent will be called once per game and is the place to load
+ /// all of your content.
+ /// </summary>
+ protected override void LoadContent()
+ {
+ // Create a new SpriteBatch, which can be used to draw textures.
+ spriteBatch = new SpriteBatch(GraphicsDevice);
+
+ // TODO: use this.Content to load your game content here
+ }
+
+ /// <summary>
+ /// UnloadContent will be called once per game and is the place to unload
+ /// game-specific content.
+ /// </summary>
+ protected override void UnloadContent()
+ {
+ // TODO: Unload any non ContentManager content here
+ }
+
+ /// <summary>
+ /// Allows the game to run logic such as updating the world,
+ /// checking for collisions, gathering input, and playing audio.
+ /// </summary>
+ /// <param name="gameTime">Provides a snapshot of timing values.</param>
+ protected override void Update(GameTime gameTime)
+ {
+ if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
+ Exit();
+
+ // TODO: Add your update logic here
+
+ base.Update(gameTime);
+ }
+
+ /// <summary>
+ /// This is called when the game should draw itself.
+ /// </summary>
+ /// <param name="gameTime">Provides a snapshot of timing values.</param>
+ protected override void Draw(GameTime gameTime)
+ {
+ GraphicsDevice.Clear(Color.CornflowerBlue);
+
+ // TODO: Add your drawing code here
+
+ base.Draw(gameTime);
+ }
+ }
+}
diff --git a/Penguloon/Penguloon.csproj b/Penguloon/Penguloon.csproj
new file mode 100644
index 0000000..bfeba13
--- /dev/null
+++ b/Penguloon/Penguloon.csproj
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{6C46FE18-F5D6-4255-A202-475C1AB5EDAE}</ProjectGuid>
+ <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Penguloon</RootNamespace>
+ <AssemblyName>Penguloon</AssemblyName>
+ <FileAlignment>512</FileAlignment>
+ <AndroidApplication>true</AndroidApplication>
+ <AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ <AndroidSupportedAbis>armeabi-v7a%3bx86</AndroidSupportedAbis>
+ <AndroidStoreUncompressedFileExtensions>.m4a</AndroidStoreUncompressedFileExtensions>
+ <MandroidI18n />
+ <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
+ <MonoGamePlatform>Android</MonoGamePlatform>
+ <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
+ <AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;ANDROID</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
+ <AndroidLinkMode>None</AndroidLinkMode>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE;ANDROID</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
+ <AndroidLinkMode>SdkOnly</AndroidLinkMode>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Mono.Android" />
+ <Reference Include="mscorlib" />
+ <Reference Include="OpenTK-1.0" />
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Xml" />
+ <Reference Include="MonoGame.Framework">
+ <HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\Android\MonoGame.Framework.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Activity1.cs" />
+ <Compile Include="Game1.cs" />
+ <Compile Include="Resources\Resource.Designer.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Resources\AboutResources.txt" />
+ <None Include="Assets\AboutAssets.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidResource Include="Resources\Values\Strings.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidResource Include="Resources\Drawable\Icon.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Resources\Layout\" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidResource Include="Resources\Drawable\Splash.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidResource Include="Resources\Values\Styles.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <MonoGameContentReference Include="Content\Content.mgcb" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AndroidManifest.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.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> \ No newline at end of file
diff --git a/Penguloon/Properties/AssemblyInfo.cs b/Penguloon/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..1bf37ac
--- /dev/null
+++ b/Penguloon/Properties/AssemblyInfo.cs
@@ -0,0 +1,41 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using Android.App;
+
+// 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("Penguloon")]
+[assembly: AssemblyProduct("Penguloon")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyCopyright("Copyright © 2017")]
+[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.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("f097d323-9e8d-4abc-bc99-484629dd0ad3")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+
+// Add some common permissions, these can be removed if not needed
+[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
+[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
diff --git a/Penguloon/Resources/AboutResources.txt b/Penguloon/Resources/AboutResources.txt
new file mode 100644
index 0000000..b0fc999
--- /dev/null
+++ b/Penguloon/Resources/AboutResources.txt
@@ -0,0 +1,44 @@
+Images, layout descriptions, binary blobs and string dictionaries can be included
+in your application as resource files. Various Android APIs are designed to
+operate on the resource IDs instead of dealing with images, strings or binary blobs
+directly.
+
+For example, a sample Android app that contains a user interface layout (Main.xml),
+an internationalization string table (Strings.xml) and some icons (drawable/Icon.png)
+would keep its resources in the "Resources" directory of the application:
+
+Resources/
+ Drawable/
+ Icon.png
+
+ Layout/
+ Main.axml
+
+ Values/
+ Strings.xml
+
+In order to get the build system to recognize Android resources, the build action should be set
+to "AndroidResource". The native Android APIs do not operate directly with filenames, but
+instead operate on resource IDs. When you compile an Android application that uses resources,
+the build system will package the resources for distribution and generate a class called
+"Resource" that contains the tokens for each one of the resources included. For example,
+for the above Resources layout, this is what the Resource class would expose:
+
+public class Resource {
+ public class Drawable {
+ public const int Icon = 0x123;
+ }
+
+ public class Layout {
+ public const int Main = 0x456;
+ }
+
+ public class String {
+ public const int FirstString = 0xabc;
+ public const int SecondString = 0xbcd;
+ }
+}
+
+You would then use Resource.Drawable.Icon to reference the Drawable/Icon.png file, or
+Resource.Layout.Main to reference the Layout/Main.axml file, or Resource.String.FirstString
+to reference the first string in the dictionary file Values/Strings.xml. \ No newline at end of file
diff --git a/Penguloon/Resources/Drawable/Icon.png b/Penguloon/Resources/Drawable/Icon.png
new file mode 100644
index 0000000..f6f4f41
--- /dev/null
+++ b/Penguloon/Resources/Drawable/Icon.png
Binary files differ
diff --git a/Penguloon/Resources/Drawable/Splash.png b/Penguloon/Resources/Drawable/Splash.png
new file mode 100644
index 0000000..2f86107
--- /dev/null
+++ b/Penguloon/Resources/Drawable/Splash.png
Binary files differ
diff --git a/Penguloon/Resources/Resource.Designer.cs b/Penguloon/Resources/Resource.Designer.cs
new file mode 100644
index 0000000..d408e93
--- /dev/null
+++ b/Penguloon/Resources/Resource.Designer.cs
@@ -0,0 +1,65 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.269
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Penguloon
+{
+
+
+ public partial class Resource
+ {
+
+ public partial class Attribute
+ {
+
+ private Attribute()
+ {
+ }
+ }
+
+ public partial class Drawable
+ {
+
+ // aapt resource value: 0x7f020000
+ public const int Icon = 2130837504;
+
+ // aapt resource value: 0x7f020001
+ public const int Splash = 2130837505;
+
+ private Drawable()
+ {
+ }
+ }
+
+ public partial class String
+ {
+
+ // aapt resource value: 0x7f030001
+ public const int ApplicationName = 2130903041;
+
+ // aapt resource value: 0x7f030000
+ public const int Hello = 2130903040;
+
+ private String()
+ {
+ }
+ }
+
+ public partial class Style
+ {
+
+ // aapt resource value: 0x7f040000
+ public const int Theme_Splash = 2130968576;
+
+ private Style()
+ {
+ }
+ }
+ }
+}
diff --git a/Penguloon/Resources/Values/Strings.xml b/Penguloon/Resources/Values/Strings.xml
new file mode 100644
index 0000000..01bbd6d
--- /dev/null
+++ b/Penguloon/Resources/Values/Strings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="Hello">Hello World, Click Me!</string>
+ <string name="ApplicationName">Penguloon</string>
+</resources>
diff --git a/Penguloon/Resources/Values/Styles.xml b/Penguloon/Resources/Values/Styles.xml
new file mode 100644
index 0000000..5102134
--- /dev/null
+++ b/Penguloon/Resources/Values/Styles.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <style name="Theme.Splash" parent="android:Theme">
+ <item name="android:windowBackground">@drawable/splash</item>
+ <item name="android:windowNoTitle">true</item>
+ </style>
+</resources>