This repository has been archived by the owner on Nov 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic samples ported to new project templates from Wave Engine v2.5
- Loading branch information
Showing
104 changed files
with
4,178 additions
and
14,135 deletions.
There are no files selected for viewing
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
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,30 @@ | ||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2013 | ||
VisualStudioVersion = 12.0.31101.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GettingStarted", "Launchers\Linux\GettingStarted.csproj", "{D5CB11BC-0227-42AF-BE20-306B5744F50C}" | ||
EndProject | ||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "GettingStartedSource", "SharedSource\Main\GettingStartedSource.shproj", "{846D34C8-E537-4DC7-B646-CFF649CE42E4}" | ||
EndProject | ||
Global | ||
GlobalSection(SharedMSBuildProjectFiles) = preSolution | ||
SharedSource\Main\GettingStartedSource.projitems*{846d34c8-e537-4dc7-b646-cff649ce42e4}*SharedItemsImports = 13 | ||
SharedSource\Main\GettingStartedSource.projitems*{d5cb11bc-0227-42af-be20-306b5744f50c}*SharedItemsImports = 4 | ||
EndGlobalSection | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|x86 = Debug|x86 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{D5CB11BC-0227-42AF-BE20-306B5744F50C}.Debug|x86.ActiveCfg = Debug|x86 | ||
{D5CB11BC-0227-42AF-BE20-306B5744F50C}.Debug|x86.Build.0 = Debug|x86 | ||
{D5CB11BC-0227-42AF-BE20-306B5744F50C}.Release|x86.ActiveCfg = Release|x86 | ||
{D5CB11BC-0227-42AF-BE20-306B5744F50C}.Release|x86.Build.0 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(SpecExplorer.ActivityCompletionStatus) = preSolution | ||
SpecExplorer.ActivityCompletionStatus = | ||
EndGlobalSection | ||
EndGlobal |
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,28 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 11.00 | ||
# Visual Studio 2010 | ||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "GettingStartedSource", "SharedSource\Main\GettingStartedSource.shproj", "{846D34C8-E537-4DC7-B646-CFF649CE42E4}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GettingStarted", "Launchers\MacOS\GettingStarted.csproj", "{F3CC4527-43AF-41CB-94C1-BFF310D5726A}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
AppStore|Any CPU = AppStore|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{F3CC4527-43AF-41CB-94C1-BFF310D5726A}.AppStore|Any CPU.ActiveCfg = AppStore|Any CPU | ||
{F3CC4527-43AF-41CB-94C1-BFF310D5726A}.AppStore|Any CPU.Build.0 = AppStore|Any CPU | ||
{F3CC4527-43AF-41CB-94C1-BFF310D5726A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{F3CC4527-43AF-41CB-94C1-BFF310D5726A}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{F3CC4527-43AF-41CB-94C1-BFF310D5726A}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{F3CC4527-43AF-41CB-94C1-BFF310D5726A}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(SpecExplorer.ActivityCompletionStatus) = preSolution | ||
SpecExplorer.ActivityCompletionStatus = | ||
EndGlobalSection | ||
EndGlobal |
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,124 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using WaveEngine.Framework.Services; | ||
using System.IO; | ||
using System.Reflection; | ||
using WaveEngine.Common.Graphics; | ||
using WaveEngine.Common.Input; | ||
using WaveEngine.Common.Math; | ||
using WaveEngine.Framework.Graphics; | ||
|
||
namespace GettingStarted | ||
{ | ||
public class App : WaveEngine.Adapter.Application | ||
{ | ||
GettingStarted.Game game; | ||
SpriteBatch spriteBatch; | ||
Texture2D splashScreen; | ||
bool splashState = true; | ||
TimeSpan time; | ||
Vector2 position; | ||
Color backgroundSplashColor; | ||
bool lastKeyF10Pressed = false; | ||
|
||
public App() | ||
{ | ||
this.Width = 1280; | ||
this.Height = 720; | ||
this.FullScreen = false; | ||
this.WindowTitle = "GettingStarted"; | ||
} | ||
|
||
public override void Initialize() | ||
{ | ||
this.game = new GettingStarted.Game(); | ||
this.game.Initialize(this); | ||
|
||
#region DEFAULT SPLASHSCREEN | ||
this.backgroundSplashColor = Color.White; | ||
this.spriteBatch = new SpriteBatch(WaveServices.GraphicsDevice); | ||
|
||
var resourceNames = Assembly.GetExecutingAssembly().GetManifestResourceNames(); | ||
string name = string.Empty; | ||
|
||
foreach (string item in resourceNames) | ||
{ | ||
if (item.Contains("SplashScreen.png")) | ||
{ | ||
name = item; | ||
break; | ||
} | ||
} | ||
|
||
if (string.IsNullOrWhiteSpace(name)) | ||
{ | ||
throw new InvalidProgramException("License terms not agreed."); | ||
} | ||
|
||
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(name)) | ||
{ | ||
this.splashScreen = Texture2D.FromFile(WaveServices.GraphicsDevice, stream); | ||
} | ||
#endregion | ||
} | ||
|
||
public override void Update(TimeSpan elapsedTime) | ||
{ | ||
if (this.game != null && !this.game.HasExited) | ||
{ | ||
bool keyF10Pressed = WaveServices.Input.KeyboardState.F10 == ButtonState.Pressed; | ||
if (keyF10Pressed && !this.lastKeyF10Pressed) | ||
{ | ||
this.FullScreen = !this.FullScreen; | ||
} | ||
|
||
this.lastKeyF10Pressed = keyF10Pressed; | ||
|
||
if (this.splashState) | ||
{ | ||
#region DEFAULT SPLASHSCREEN | ||
position.X = (this.Width / 2.0f) - (this.splashScreen.Width / 2.0f); | ||
position.Y = (this.Height / 2.0f) - (this.splashScreen.Height / 2.0f); | ||
this.time += elapsedTime; | ||
if (time > TimeSpan.FromSeconds(2)) | ||
{ | ||
this.splashState = false; | ||
} | ||
#endregion | ||
} | ||
else | ||
{ | ||
if (WaveServices.Input.KeyboardState.Escape == ButtonState.Pressed) | ||
{ | ||
WaveServices.Platform.Exit(); | ||
} | ||
else | ||
{ | ||
this.game.UpdateFrame(elapsedTime); | ||
} | ||
} | ||
} | ||
} | ||
|
||
public override void Draw(TimeSpan elapsedTime) | ||
{ | ||
if (this.game != null && !this.game.HasExited) | ||
{ | ||
if (this.splashState) | ||
{ | ||
#region DEFAULT SPLASHSCREEN | ||
WaveServices.GraphicsDevice.RenderTargets.SetRenderTarget(null); | ||
WaveServices.GraphicsDevice.Clear(ref this.backgroundSplashColor, ClearFlags.Target, 1); | ||
this.spriteBatch.Draw (this.splashScreen, this.position, Color.White); | ||
this.spriteBatch.Render (); | ||
#endregion | ||
} | ||
else | ||
{ | ||
this.game.DrawFrame(elapsedTime); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
Binary file not shown.
147 changes: 147 additions & 0 deletions
147
Basic/GettingStarted/Launchers/Linux/GettingStarted.csproj
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,147 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<ProjectGuid>{D5CB11BC-0227-42AF-BE20-306B5744F50C}</ProjectGuid> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> | ||
<OutputType>WinExe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>GettingStarted</RootNamespace> | ||
<AssemblyName>GettingStarted</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<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>TRACE;LINUX</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<NoStdLib>true</NoStdLib> | ||
<UseVSHostingProcess>false</UseVSHostingProcess> | ||
<PlatformTarget>x86</PlatformTarget> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\x86\Release</OutputPath> | ||
<DefineConstants>LINUX</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<NoStdLib>true</NoStdLib> | ||
<UseVSHostingProcess>false</UseVSHostingProcess> | ||
<PlatformTarget>x86</PlatformTarget> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="mscorlib" /> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Net" /> | ||
<Reference Include="System.Runtime.Serialization" /> | ||
<Reference Include="WaveEngine.Adapter"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\..\packages\WaveEngine.Adapter.2.5.1-alpha-20180620-662\lib\Mono\WaveEngine.Adapter.dll</HintPath> | ||
</Reference> | ||
<Reference Include="WaveEngine.Common"> | ||
<HintPath>..\..\packages\WaveEngine.Common.2.5.1-alpha-20180620-662\lib\Mono\WaveEngine.Common.dll</HintPath> | ||
</Reference> | ||
<Reference Include="WaveEngine.Box2D"> | ||
<HintPath>..\..\packages\WaveEngine.Box2D.2.5.1-alpha-20180620-662\lib\Mono\WaveEngine.Box2D.dll</HintPath> | ||
</Reference> | ||
<Reference Include="WaveEngine.Bullet"> | ||
<HintPath>..\..\packages\WaveEngine.Bullet.2.5.1-alpha-20180620-662\lib\Mono\WaveEngine.Bullet.dll</HintPath> | ||
</Reference> | ||
<Reference Include="WaveEngine.Framework"> | ||
<HintPath>..\..\packages\WaveEngine.Framework.2.5.1-alpha-20180620-662\lib\Mono\WaveEngine.Framework.dll</HintPath> | ||
</Reference> | ||
<Reference Include="WaveEngine.Components"> | ||
<HintPath>..\..\packages\WaveEngine.Components.2.5.1-alpha-20180620-662\lib\Mono\WaveEngine.Components.dll</HintPath> | ||
</Reference> | ||
<Reference Include="WaveEngine.Materials"> | ||
<HintPath>..\..\packages\WaveEngine.Materials.2.5.1-alpha-20180620-662\lib\Mono\WaveEngine.Materials.dll</HintPath> | ||
</Reference> | ||
<Reference Include="WaveEngine.ImageEffects"> | ||
<HintPath>..\..\packages\WaveEngine.ImageEffects.2.5.1-alpha-20180620-662\lib\Mono\WaveEngine.ImageEffects.dll</HintPath> | ||
</Reference> | ||
<Reference Include="OpenTK"> | ||
<HintPath>..\..\packages\WaveEngine.Adapter.2.5.1-alpha-20180620-662\lib\Mono\OpenTK.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Application.cs" /> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<EmbeddedResource Include="Game.ico" /> | ||
<EmbeddedResource Include="SplashScreen.png" /> | ||
</ItemGroup> | ||
<!-- | ||
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> | ||
--> | ||
<Import Project="..\..\SharedSource\Main\GettingStartedSource.projitems" Label="Shared" Condition="Exists('..\..\SharedSource\Main\GettingStartedSource.projitems')" /> | ||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | ||
<Import Project="..\..\packages\WaveEngine.2.5.1-alpha-20180620-662\build\Mono\WaveEngine.targets" Condition="Exists('..\..\packages\WaveEngine.2.5.1-alpha-20180620-662\build\Mono\WaveEngine.targets')" /> | ||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||
<PropertyGroup> | ||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | ||
</PropertyGroup> | ||
<Error Condition="!Exists('..\..\packages\WaveEngine.2.5.1-alpha-20180620-662\build\Mono\WaveEngine.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WaveEngine.2.5.1-alpha-20180620-662\build\Mono\WaveEngine.targets'))" /> | ||
</Target> | ||
<Import Project="..\..\packages\WaveEngine.Box2D.2.5.1-alpha-20180620-662\build\Mono\WaveEngine.Box2D.targets" Condition="Exists('..\..\packages\WaveEngine.Box2D.2.5.1-alpha-20180620-662\build\Mono\WaveEngine.Box2D.targets')" /> | ||
<Import Project="..\..\packages\WaveEngine.Bullet.2.5.1-alpha-20180620-662\build\Mono\WaveEngine.Bullet.targets" Condition="Exists('..\..\packages\WaveEngine.Bullet.2.5.1-alpha-20180620-662\build\Mono\WaveEngine.Bullet.targets')" /> | ||
<ItemGroup> | ||
<BootstrapperPackage Include=".NETFramework,Version=v4.5"> | ||
<Visible>False</Visible> | ||
<ProductName>Microsoft .NET Framework 4.5 %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> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="..\..\packages\WaveEngine.Adapter.2.5.1-alpha-20180620-662\lib\Mono\OpenTK.dll.config"> | ||
<Link>OpenTK.dll.config</Link> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
<None Include="..\..\packages\WaveEngine.Adapter.2.5.1-alpha-20180620-662\lib\Mono\SdlDotNet.dll.config"> | ||
<Link>SdlDotNet.dll.config</Link> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
<None Include="..\..\packages\WaveEngine.Adapter.2.5.1-alpha-20180620-662\lib\Mono\Tao.Sdl.dll.config"> | ||
<Link>Tao.Sdl.dll.config</Link> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
</ItemGroup> | ||
</Project> |
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,19 @@ | ||
using System; | ||
|
||
namespace GettingStarted | ||
{ | ||
static class Program | ||
{ | ||
/// <summary> | ||
/// The main entry point for the application. | ||
/// </summary> | ||
static void Main(string[] args) | ||
{ | ||
using (App game = new App()) | ||
{ | ||
game.Run(); | ||
} | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.