diff --git a/GoneBananas/GoneBananas.sln b/GoneBananas/GoneBananas.sln new file mode 100644 index 0000000..7b19ecf --- /dev/null +++ b/GoneBananas/GoneBananas.sln @@ -0,0 +1,48 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GoneBananasiOS", "GoneBananasiOS\GoneBananasiOS.csproj", "{0F682923-EE76-4240-BBEB-56BF44B82A57}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GoneBananasAndroid", "GoneBananasAndroid\GoneBananasAndroid.csproj", "{7B89D990-03EA-4FF4-8392-376C08E37161}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "GoneBananasShared", "GoneBananasShared\GoneBananasShared.shproj", "{7187ABEC-F6E0-4CF4-8E8C-481DBE6DA18B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|iPhoneSimulator = Debug|iPhoneSimulator + Release|iPhoneSimulator = Release|iPhoneSimulator + Debug|iPhone = Debug|iPhone + Release|iPhone = Release|iPhone + Ad-Hoc|iPhone = Ad-Hoc|iPhone + AppStore|iPhone = AppStore|iPhone + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0F682923-EE76-4240-BBEB-56BF44B82A57}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone + {0F682923-EE76-4240-BBEB-56BF44B82A57}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone + {0F682923-EE76-4240-BBEB-56BF44B82A57}.AppStore|iPhone.ActiveCfg = AppStore|iPhone + {0F682923-EE76-4240-BBEB-56BF44B82A57}.AppStore|iPhone.Build.0 = AppStore|iPhone + {0F682923-EE76-4240-BBEB-56BF44B82A57}.Debug|iPhone.ActiveCfg = Debug|iPhone + {0F682923-EE76-4240-BBEB-56BF44B82A57}.Debug|iPhone.Build.0 = Debug|iPhone + {0F682923-EE76-4240-BBEB-56BF44B82A57}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator + {0F682923-EE76-4240-BBEB-56BF44B82A57}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator + {0F682923-EE76-4240-BBEB-56BF44B82A57}.Release|iPhone.ActiveCfg = Release|iPhone + {0F682923-EE76-4240-BBEB-56BF44B82A57}.Release|iPhone.Build.0 = Release|iPhone + {0F682923-EE76-4240-BBEB-56BF44B82A57}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator + {0F682923-EE76-4240-BBEB-56BF44B82A57}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator + {7B89D990-03EA-4FF4-8392-376C08E37161}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU + {7B89D990-03EA-4FF4-8392-376C08E37161}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU + {7B89D990-03EA-4FF4-8392-376C08E37161}.AppStore|iPhone.ActiveCfg = Release|Any CPU + {7B89D990-03EA-4FF4-8392-376C08E37161}.AppStore|iPhone.Build.0 = Release|Any CPU + {7B89D990-03EA-4FF4-8392-376C08E37161}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {7B89D990-03EA-4FF4-8392-376C08E37161}.Debug|iPhone.Build.0 = Debug|Any CPU + {7B89D990-03EA-4FF4-8392-376C08E37161}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {7B89D990-03EA-4FF4-8392-376C08E37161}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {7B89D990-03EA-4FF4-8392-376C08E37161}.Release|iPhone.ActiveCfg = Release|Any CPU + {7B89D990-03EA-4FF4-8392-376C08E37161}.Release|iPhone.Build.0 = Release|Any CPU + {7B89D990-03EA-4FF4-8392-376C08E37161}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {7B89D990-03EA-4FF4-8392-376C08E37161}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = GoneBananasiOS\GoneBananasiOS.csproj + EndGlobalSection +EndGlobal diff --git a/GoneBananas/GoneBananasAndroid/Assets/AboutAssets.txt b/GoneBananas/GoneBananasAndroid/Assets/AboutAssets.txt new file mode 100644 index 0000000..a9b0638 --- /dev/null +++ b/GoneBananas/GoneBananasAndroid/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 your 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"); diff --git a/GoneBananas/GoneBananasAndroid/Assets/Content/Sounds/tap.mp3 b/GoneBananas/GoneBananasAndroid/Assets/Content/Sounds/tap.mp3 new file mode 100644 index 0000000..6d7665a Binary files /dev/null and b/GoneBananas/GoneBananasAndroid/Assets/Content/Sounds/tap.mp3 differ diff --git a/GoneBananas/GoneBananasAndroid/Assets/Content/fonts/arial-22.xnb b/GoneBananas/GoneBananasAndroid/Assets/Content/fonts/arial-22.xnb new file mode 100644 index 0000000..75be35b Binary files /dev/null and b/GoneBananas/GoneBananasAndroid/Assets/Content/fonts/arial-22.xnb differ diff --git a/GoneBananas/GoneBananasAndroid/Assets/Content/hd/animations/monkey.plist b/GoneBananas/GoneBananasAndroid/Assets/Content/hd/animations/monkey.plist new file mode 100644 index 0000000..b45f18b --- /dev/null +++ b/GoneBananas/GoneBananasAndroid/Assets/Content/hd/animations/monkey.plist @@ -0,0 +1,139 @@ + + + + + frames + + Banana-hd.png + + frame + {{2,2},{44,108}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{44,108}} + sourceSize + {44,108} + + frame-1.png + + frame + {{48,2},{391,555}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{391,555}} + sourceSize + {391,555} + + frame-2.png + + frame + {{441,2},{390,553}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{390,553}} + sourceSize + {390,553} + + frame-3.png + + frame + {{833,2},{387,566}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{387,566}} + sourceSize + {387,566} + + frame-4.png + + frame + {{1222,2},{386,579}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{386,579}} + sourceSize + {386,579} + + frame-5.png + + frame + {{1610,2},{387,573}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{387,573}} + sourceSize + {387,573} + + frame-6.png + + frame + {{2,583},{389,560}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{389,560}} + sourceSize + {389,560} + + frame-7.png + + frame + {{393,583},{390,553}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{390,553}} + sourceSize + {390,553} + + frame-8.png + + frame + {{785,583},{389,557}} + offset + {0,0} + rotated + + sourceColorRect + {{0,0},{389,557}} + sourceSize + {389,557} + + + metadata + + format + 2 + realTextureFileName + monkey.png + size + {2048,2048} + smartupdate + $TexturePacker:SmartUpdate:c63ac17999f746ee253cb9e63215058f:7b9d55d9c4db1e73987b80a4545fa776:c408e1678cc8476d89ba18c5256b3484$ + textureFileName + monkey.png + + + diff --git a/GoneBananas/GoneBananasAndroid/Assets/Content/hd/animations/monkey.png b/GoneBananas/GoneBananasAndroid/Assets/Content/hd/animations/monkey.png new file mode 100644 index 0000000..7aecb29 Binary files /dev/null and b/GoneBananas/GoneBananasAndroid/Assets/Content/hd/animations/monkey.png differ diff --git a/GoneBananas/GoneBananasAndroid/Assets/Content/hd/balls.png b/GoneBananas/GoneBananasAndroid/Assets/Content/hd/balls.png new file mode 100755 index 0000000..2ba46b5 Binary files /dev/null and b/GoneBananas/GoneBananasAndroid/Assets/Content/hd/balls.png differ diff --git a/GoneBananas/GoneBananasAndroid/Assets/Content/hd/cloud.png b/GoneBananas/GoneBananasAndroid/Assets/Content/hd/cloud.png new file mode 100644 index 0000000..8957f1e Binary files /dev/null and b/GoneBananas/GoneBananasAndroid/Assets/Content/hd/cloud.png differ diff --git a/GoneBananas/GoneBananasAndroid/Assets/Content/hd/grass.png b/GoneBananas/GoneBananasAndroid/Assets/Content/hd/grass.png new file mode 100644 index 0000000..d8b8620 Binary files /dev/null and b/GoneBananas/GoneBananasAndroid/Assets/Content/hd/grass.png differ diff --git a/GoneBananas/GoneBananasAndroid/GoneBananasAndroid.csproj b/GoneBananas/GoneBananasAndroid/GoneBananasAndroid.csproj new file mode 100644 index 0000000..2621d73 --- /dev/null +++ b/GoneBananas/GoneBananasAndroid/GoneBananasAndroid.csproj @@ -0,0 +1,81 @@ + + + + Debug + AnyCPU + {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 8.0.30703 + 2.0 + {7B89D990-03EA-4FF4-8392-376C08E37161} + Library + GoneBananasAndroid + Assets + Resources + Resource + Resources\Resource.designer.cs + True + False + GoneBananasAndroid + v4.0.3 + Properties\AndroidManifest.xml + + + true + full + false + bin\Debug + DEBUG;ANDROID; + prompt + 4 + None + false + + + full + true + bin\Release + prompt + 4 + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GoneBananas/GoneBananasAndroid/MainActivity.cs b/GoneBananas/GoneBananasAndroid/MainActivity.cs new file mode 100644 index 0000000..6d9b711 --- /dev/null +++ b/GoneBananas/GoneBananasAndroid/MainActivity.cs @@ -0,0 +1,38 @@ +using System; + +using Android.App; +using Android.Content; +using Android.Content.PM; +using Android.OS; +using Android.Runtime; +using Android.Views; +using Android.Widget; +using CocosSharp; +using Microsoft.Xna.Framework; +using GoneBananas; + +namespace GoneBananasAndroid +{ + [Activity( + Label = "GoneBananas", + AlwaysRetainTaskState = true, + Icon = "@drawable/ic_launcher", + Theme = "@android:style/Theme.NoTitleBar", + ScreenOrientation = ScreenOrientation.Portrait, + LaunchMode = LaunchMode.SingleInstance, + MainLauncher = true, + ConfigurationChanges = ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden) + ] + public class MainActivity : AndroidGameActivity + { + protected override void OnCreate(Bundle bundle) + { + base.OnCreate(bundle); + + var application = new CCApplication(); + application.ApplicationDelegate = new GoneBananasApplicationDelegate(); + SetContentView(application.AndroidContentView); + application.StartGame(); + } + } +} \ No newline at end of file diff --git a/GoneBananas/GoneBananasAndroid/Properties/AndroidManifest.xml b/GoneBananas/GoneBananasAndroid/Properties/AndroidManifest.xml new file mode 100644 index 0000000..45d43e4 --- /dev/null +++ b/GoneBananas/GoneBananasAndroid/Properties/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/GoneBananas/GoneBananasAndroid/Properties/AssemblyInfo.cs b/GoneBananas/GoneBananasAndroid/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..324e91f --- /dev/null +++ b/GoneBananas/GoneBananasAndroid/Properties/AssemblyInfo.cs @@ -0,0 +1,28 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using Android.App; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle ("GoneBananasAndroid")] +[assembly: AssemblyDescription ("")] +[assembly: AssemblyConfiguration ("")] +[assembly: AssemblyCompany ("")] +[assembly: AssemblyProduct ("")] +[assembly: AssemblyCopyright ("mike_bluestein")] +[assembly: AssemblyTrademark ("")] +[assembly: AssemblyCulture ("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion ("1.0.0")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/GoneBananas/GoneBananasAndroid/Resources/AboutResources.txt b/GoneBananas/GoneBananasAndroid/Resources/AboutResources.txt new file mode 100644 index 0000000..10f52d4 --- /dev/null +++ b/GoneBananas/GoneBananasAndroid/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.axml), +an internationalization string table (strings.xml) and some icons (drawable-XXX/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, set the build action 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 "R" +(this is an Android convention) that contains the tokens for each one of the resources +included. For example, for the above Resources layout, this is what the R class would expose: + +public class R { + public class drawable { + public const int icon = 0x123; + } + + public class layout { + public const int main = 0x456; + } + + public class strings { + public const int first_string = 0xabc; + public const int second_string = 0xbcd; + } +} + +You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main +to reference the layout/main.axml file, or R.strings.first_string to reference the first +string in the dictionary file values/strings.xml. diff --git a/GoneBananas/GoneBananasAndroid/Resources/Resource.designer.cs b/GoneBananas/GoneBananasAndroid/Resources/Resource.designer.cs new file mode 100644 index 0000000..73c9d96 --- /dev/null +++ b/GoneBananas/GoneBananasAndroid/Resources/Resource.designer.cs @@ -0,0 +1,112 @@ +#pragma warning disable 1591 +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Mono Runtime Version: 4.0.30319.17020 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +[assembly: Android.Runtime.ResourceDesignerAttribute("GoneBananasAndroid.Resource", IsApplication=true)] + +namespace GoneBananasAndroid +{ + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")] + public partial class Resource + { + + static Resource() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + public static void UpdateIdValues() + { + } + + public partial class Attribute + { + + static Attribute() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + private Attribute() + { + } + } + + public partial class Drawable + { + + // aapt resource value: 0x7f020000 + public const int ic_launcher = 2130837504; + + static Drawable() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + private Drawable() + { + } + } + + public partial class Id + { + + // aapt resource value: 0x7f050000 + public const int myButton = 2131034112; + + static Id() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + private Id() + { + } + } + + public partial class Layout + { + + // aapt resource value: 0x7f030000 + public const int Main = 2130903040; + + static Layout() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + private Layout() + { + } + } + + public partial class String + { + + // aapt resource value: 0x7f040001 + public const int app_name = 2130968577; + + // aapt resource value: 0x7f040000 + public const int hello = 2130968576; + + static String() + { + global::Android.Runtime.ResourceIdManager.UpdateIdValues(); + } + + private String() + { + } + } + } +} +#pragma warning restore 1591 diff --git a/GoneBananas/GoneBananasAndroid/Resources/drawable/ic_launcher.png b/GoneBananas/GoneBananasAndroid/Resources/drawable/ic_launcher.png new file mode 100644 index 0000000..1760deb Binary files /dev/null and b/GoneBananas/GoneBananasAndroid/Resources/drawable/ic_launcher.png differ diff --git a/GoneBananas/GoneBananasAndroid/Resources/layout/Main.axml b/GoneBananas/GoneBananasAndroid/Resources/layout/Main.axml new file mode 100644 index 0000000..bd890ff --- /dev/null +++ b/GoneBananas/GoneBananasAndroid/Resources/layout/Main.axml @@ -0,0 +1,14 @@ + + +