-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e56483
commit 8b928a1
Showing
99 changed files
with
1,586 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
############################################################################### | ||
|
||
Tappy Plane by Kenney Vleugels (www.kenney.nl) | ||
|
||
------------------------------ | ||
|
||
License (CC0) | ||
http://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
You may use these graphics in personal and commercial projects. | ||
Credit (Kenney or www.kenney.nl) would be nice but is not mandatory. | ||
|
||
############################################################################### |
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
| ||
|
||
|
||
namespace Nez | ||
{ | ||
class Content | ||
{ | ||
public static class Letters | ||
{ | ||
public const string letterA = @"Letters\letterA"; | ||
public const string letterB = @"Letters\letterB"; | ||
public const string letterC = @"Letters\letterC"; | ||
public const string letterD = @"Letters\letterD"; | ||
public const string letterE = @"Letters\letterE"; | ||
public const string letterF = @"Letters\letterF"; | ||
public const string letterG = @"Letters\letterG"; | ||
public const string letterH = @"Letters\letterH"; | ||
public const string letterI = @"Letters\letterI"; | ||
public const string letterJ = @"Letters\letterJ"; | ||
public const string letterK = @"Letters\letterK"; | ||
public const string letterL = @"Letters\letterL"; | ||
public const string letterM = @"Letters\letterM"; | ||
public const string letterN = @"Letters\letterN"; | ||
public const string letterO = @"Letters\letterO"; | ||
public const string letterP = @"Letters\letterP"; | ||
public const string letterQ = @"Letters\letterQ"; | ||
public const string letterR = @"Letters\letterR"; | ||
public const string letterS = @"Letters\letterS"; | ||
public const string letterT = @"Letters\letterT"; | ||
public const string letterU = @"Letters\letterU"; | ||
public const string letterV = @"Letters\letterV"; | ||
public const string letterW = @"Letters\letterW"; | ||
public const string letterX = @"Letters\letterX"; | ||
public const string letterY = @"Letters\letterY"; | ||
public const string letterZ = @"Letters\letterZ"; | ||
} | ||
|
||
public static class Numbers | ||
{ | ||
public const string number0 = @"Numbers\number0"; | ||
public const string number1 = @"Numbers\number1"; | ||
public const string number2 = @"Numbers\number2"; | ||
public const string number3 = @"Numbers\number3"; | ||
public const string number4 = @"Numbers\number4"; | ||
public const string number5 = @"Numbers\number5"; | ||
public const string number6 = @"Numbers\number6"; | ||
public const string number7 = @"Numbers\number7"; | ||
public const string number8 = @"Numbers\number8"; | ||
public const string number9 = @"Numbers\number9"; | ||
} | ||
|
||
public static class Planes | ||
{ | ||
public const string planeBlue1 = @"Planes\planeBlue1"; | ||
public const string planeBlue2 = @"Planes\planeBlue2"; | ||
public const string planeBlue3 = @"Planes\planeBlue3"; | ||
public const string planeGreen1 = @"Planes\planeGreen1"; | ||
public const string planeGreen2 = @"Planes\planeGreen2"; | ||
public const string planeGreen3 = @"Planes\planeGreen3"; | ||
public const string planeRed1 = @"Planes\planeRed1"; | ||
public const string planeRed2 = @"Planes\planeRed2"; | ||
public const string planeRed3 = @"Planes\planeRed3"; | ||
public const string planeYellow1 = @"Planes\planeYellow1"; | ||
public const string planeYellow2 = @"Planes\planeYellow2"; | ||
public const string planeYellow3 = @"Planes\planeYellow3"; | ||
} | ||
|
||
public static class Terrain | ||
{ | ||
public const string background = @"Terrain\background"; | ||
public const string groundDirt = @"Terrain\groundDirt"; | ||
public const string groundGrass = @"Terrain\groundGrass"; | ||
public const string groundIce = @"Terrain\groundIce"; | ||
public const string groundRock = @"Terrain\groundRock"; | ||
public const string groundSnow = @"Terrain\groundSnow"; | ||
public const string puffLarge = @"Terrain\puffLarge"; | ||
public const string puffSmall = @"Terrain\puffSmall"; | ||
public const string rock = @"Terrain\rock"; | ||
public const string rockDown = @"Terrain\rockDown"; | ||
public const string rockGrass = @"Terrain\rockGrass"; | ||
public const string rockGrassDown = @"Terrain\rockGrassDown"; | ||
public const string rockIce = @"Terrain\rockIce"; | ||
public const string rockIceDown = @"Terrain\rockIceDown"; | ||
public const string rockSnow = @"Terrain\rockSnow"; | ||
public const string rockSnowDown = @"Terrain\rockSnowDown"; | ||
} | ||
|
||
public static class UI | ||
{ | ||
public const string buttonLarge = @"UI\buttonLarge"; | ||
public const string buttonSmall = @"UI\buttonSmall"; | ||
public const string medalBronze = @"UI\medalBronze"; | ||
public const string medalGold = @"UI\medalGold"; | ||
public const string medalSilver = @"UI\medalSilver"; | ||
public const string starBronze = @"UI\starBronze"; | ||
public const string starGold = @"UI\starGold"; | ||
public const string starSilver = @"UI\starSilver"; | ||
public const string tap = @"UI\tap"; | ||
public const string tapLeft = @"UI\tapLeft"; | ||
public const string tapRight = @"UI\tapRight"; | ||
public const string tapTick = @"UI\tapTick"; | ||
public const string textGameOver = @"UI\textGameOver"; | ||
public const string textGetReady = @"UI\textGetReady"; | ||
public const string uIbg = @"UI\UIbg"; | ||
} | ||
|
||
|
||
} | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
<#@ template language="C#" hostSpecific="true" #> | ||
<#@ assembly name="System.Core" #> | ||
<#@ import namespace="System.Linq" #> | ||
<#@ import namespace="System.Text" #> | ||
<#@ import namespace="System.Collections.Generic" #> | ||
<#@ import namespace="System.IO" #> | ||
<#@ import namespace="System.Globalization" #> | ||
<#@ import namespace="System.Text.RegularExpressions" #> | ||
|
||
<# var sourceFolders = new string[] { "Content/bin/DesktopGL", "Content" }; #> | ||
|
||
|
||
namespace Nez | ||
{ | ||
class Content | ||
{ | ||
<# | ||
|
||
// loop through all of our sourceFolders | ||
foreach( var sourceFolder in sourceFolders ) | ||
{ | ||
var directories = Directory.GetDirectories( Host.ResolvePath( sourceFolder ) ); | ||
// loop through all the directories in our sourceFolder | ||
foreach( var dir in directories ) | ||
{ | ||
var dirName = new DirectoryInfo( dir ).Name.ToLower(); | ||
if( dirName == "bin" || dirName == "obj" ) | ||
continue; | ||
|
||
// dont delve into directories that don't contan xnb files | ||
var xnbFiles = Directory.GetFiles( dir, "*.xnb", SearchOption.AllDirectories ); | ||
if( xnbFiles.Length == 0 ) | ||
continue; | ||
|
||
// start off the recursive directory printing | ||
printDirectoryClass( dir, 2, sourceFolder ); | ||
} | ||
|
||
// handle any files in the root sourceFolder | ||
printContentFiles( Host.ResolvePath( sourceFolder ), 2, Host.ResolvePath( sourceFolder ) ); | ||
} | ||
|
||
#> | ||
|
||
} | ||
} | ||
|
||
|
||
|
||
<#+ | ||
// recursively creates a class for each directory | ||
void printDirectoryClass( string dir, int depth, string sourceFolder ) | ||
{ | ||
var dirInfo = new DirectoryInfo( dir ); | ||
var firstIndent = new string( '\t', depth ); | ||
var className = generateClassName( dirInfo.Name, true ); | ||
WriteLine( "{0}public static class {1}\n{2}{{", firstIndent, className, firstIndent ); | ||
|
||
// handle subdirectories | ||
foreach( var subdir in Directory.GetDirectories( dir ) ) | ||
printDirectoryClass( subdir, depth + 1, sourceFolder ); | ||
|
||
// handle files | ||
printContentFiles( dir, depth + 1, sourceFolder ); | ||
|
||
WriteLine( "{0}}}\n", firstIndent ); | ||
} | ||
|
||
|
||
// prints a const string for each file in the directory | ||
void printContentFiles( string dir, int depth, string sourceFolder ) | ||
{ | ||
var firstIndent = new string( '\t', depth ); | ||
|
||
foreach( var file in Directory.GetFiles( dir, "*.xnb" ) ) | ||
{ | ||
// clear out all of the path up to the sourceFolder so we get just the relative path to the Content folder | ||
var finalPath = file.Substring( file.IndexOf( sourceFolder ) + sourceFolder.Length ) | ||
.Replace( ".xnb", string.Empty ); | ||
var fileInfo = new FileInfo( file ); | ||
var fileName = fileInfo.Name.Replace( ".xnb", string.Empty ); | ||
var className = generateClassName( fileName, false ); | ||
|
||
if( finalPath[0] == '/' || finalPath[0] == '\\' ) | ||
finalPath = finalPath.Substring( 1 ); | ||
|
||
WriteLine( "{0}public const string {1} = @\"{2}\";", firstIndent, className, finalPath ); | ||
} | ||
} | ||
|
||
|
||
string stripInvalidPathChars( string input ) | ||
{ | ||
var invalidChars = Path.GetInvalidPathChars(); | ||
return new string( input.Where( m => !invalidChars.Contains( m ) ).ToArray<char>() ); | ||
} | ||
|
||
|
||
string stripInvalidFilenameChars( string input ) | ||
{ | ||
var invalidChars = Path.GetInvalidFileNameChars(); | ||
return new string( input.Where( m => !invalidChars.Contains( m ) ).ToArray<char>() ); | ||
} | ||
|
||
|
||
// attempts to generate a proper path name | ||
string generateClassName( string className, bool uppercaseFirstChar ) | ||
{ | ||
// handle upper or lower casing the first char in the className | ||
if( uppercaseFirstChar && char.IsLower( className[0] ) ) | ||
className = char.ToUpper( className[0] ) + className.Substring( 1 ); | ||
else if( !uppercaseFirstChar && char.IsUpper( className[0] ) ) | ||
className = char.ToLower( className[0] ) + className.Substring( 1 ); | ||
|
||
// remove invalid characters | ||
var regex = new Regex( @"[^\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Nl}\p{Mn}\p{Mc}\p{Cf}\p{Pc}\p{Lm}]" ); | ||
className = regex.Replace( className, "" ); | ||
|
||
// class name doesn't begin with a letter, insert an underscore | ||
if( !char.IsLetter( className, 0 ) ) | ||
className = className.Insert( 0, "_" ); | ||
|
||
return className.Replace( " ", string.Empty ); | ||
} | ||
#> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using Microsoft.Xna.Framework; | ||
using Nez; | ||
using Nez.Sprites; | ||
using Microsoft.Xna.Framework.Input; | ||
using Microsoft.Xna.Framework.Graphics; | ||
|
||
namespace FlappyNez.Entities | ||
{ | ||
class Plane : Component, ITriggerListener, IUpdatable | ||
{ | ||
public override void onAddedToEntity() | ||
{ | ||
|
||
} | ||
|
||
void IUpdatable.update() | ||
{ | ||
|
||
} | ||
|
||
void ITriggerListener.onTriggerEnter(Collider other, Collider self) | ||
{ | ||
|
||
} | ||
|
||
|
||
void ITriggerListener.onTriggerExit(Collider other, Collider self) | ||
{ | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="4.0" 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)' == '' ">x86</Platform> | ||
<ProjectGuid>{AF7D4E7B-804A-476A-8CF9-DA21521F1827}</ProjectGuid> | ||
<OutputType>WinExe</OutputType> | ||
<RootNamespace>FlappyNez</RootNamespace> | ||
<AssemblyName>FlappyNez</AssemblyName> | ||
<MonoGamePlatform>DesktopGL</MonoGamePlatform> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\DesktopGL\x86\Debug\</OutputPath> | ||
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<ConsolePause>false</ConsolePause> | ||
<PlatformTarget>x86</PlatformTarget> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> | ||
<DebugType>full</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\DesktopGL\x86\Release\</OutputPath> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<ConsolePause>false</ConsolePause> | ||
<PlatformTarget>x86</PlatformTarget> | ||
<DefineConstants>TRACE;LINUX</DefineConstants> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<StartupObject /> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<ApplicationIcon>Icon.ico</ApplicationIcon> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="MonoGame.Framework, Version=3.5.1.1679, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\MonoGame.Framework.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="NVorbis, Version=0.8.4.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\NVorbis.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\MonoGame.Framework.DesktopGL.3.5.1.1679\lib\net40\OpenTK.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="System.Core" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="ContentPathGenerator.cs"> | ||
<AutoGen>True</AutoGen> | ||
<DesignTime>True</DesignTime> | ||
<DependentUpon>ContentPathGenerator.tt</DependentUpon> | ||
</Compile> | ||
<Compile Include="Entities\Plane.cs" /> | ||
<Compile Include="Game.cs" /> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="Rock.cs" /> | ||
<Compile Include="Scenes\Level.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="Icon.png" /> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<EmbeddedResource Include="Icon.ico" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<MonoGameContentReference Include="Content\Content.mgcb" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="ContentPathGenerator.tt"> | ||
<Generator>TextTemplatingFileGenerator</Generator> | ||
<LastGenOutput>ContentPathGenerator.cs</LastGenOutput> | ||
</Content> | ||
<Content Include="OpenTK.dll.config"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Content> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | ||
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" /> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Nez\Nez-PCL\Nez.csproj"> | ||
<Project>{60B7197D-D0D5-405C-90A2-A56903E9B039}</Project> | ||
<Name>Nez</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" /> | ||
</ItemGroup> | ||
</Project> |
Oops, something went wrong.