initial commit
commit
87d9615845
|
@ -0,0 +1,347 @@
|
|||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
moonlibs/
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Coverlet is a free, cross platform Code Coverage Tool
|
||||
coverage*[.json, .xml, .info]
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
|
@ -0,0 +1,6 @@
|
|||
[submodule "lib/MoonWorks"]
|
||||
path = lib/MoonWorks
|
||||
url = https://gitea.moonside.games/MoonsideGames/MoonWorks.git
|
||||
[submodule "lib/MoonTools.ECS"]
|
||||
path = lib/MoonTools.ECS
|
||||
url = https://gitea.moonside.games/MoonsideGames/MoonTools.ECS.git
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Attach to .NET 6 Debugger",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "Build: .NET 6 Debug",
|
||||
"program": "${workspaceFolder}/bin/x64/Debug/net6.0/MoonWorksECSTest.dll",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/bin/x64/Debug/net6.0",
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"options": {
|
||||
"cwd": "${workspaceRoot}"
|
||||
},
|
||||
"windows": {
|
||||
"options": {
|
||||
"shell": {
|
||||
"executable": "cmd.exe",
|
||||
"args": [
|
||||
"/d",
|
||||
"/c"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"focus": true,
|
||||
"panel": "shared"
|
||||
},
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Build & Run: .NET 6 Debug",
|
||||
"type": "shell",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn": [
|
||||
"Build: .NET 6 Debug",
|
||||
"Run: .NET 6 Debug"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Build: .NET 6 Debug",
|
||||
"command": "dotnet",
|
||||
"args": [
|
||||
"build",
|
||||
"./MoonWorksECSTest.csproj",
|
||||
"-p:SolutionDir=${workspaceFolder}/",
|
||||
"-p:Platform=x64"
|
||||
],
|
||||
"type": "shell",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Run: .NET 6 Debug",
|
||||
"command": "dotnet",
|
||||
"args": [
|
||||
"./MoonWorksECSTest.dll"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/bin/x64/Debug/net6.0"
|
||||
},
|
||||
"type": "process",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Build: .NET 6 Release",
|
||||
"command": "dotnet",
|
||||
"args": [
|
||||
"build",
|
||||
"./MoonWorksECSTest.csproj",
|
||||
"--configuration",
|
||||
"Release",
|
||||
"-p:SolutionDir=${workspaceFolder}/",
|
||||
"-p:Platform=x64"
|
||||
],
|
||||
"type": "shell",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Run: .NET 5 Release",
|
||||
"command": "dotnet",
|
||||
"args": [
|
||||
"./MoonWorksECSTest.dll"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/bin/x64/Release/net6.0"
|
||||
},
|
||||
"type": "process",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Build & Run: .NET 6 Release",
|
||||
"dependsOrder": "sequence",
|
||||
"dependsOn": [
|
||||
"Build: .NET 6 Release",
|
||||
"Run: .NET 6 Release"
|
||||
],
|
||||
"type": "shell",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Insert your content files here (sprites, sound, etc)
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<Target Name="Runtime ID" AfterTargets="Build">
|
||||
<Message Text="Runtime ID: $(RuntimeIdentifier)" Importance="high"/>
|
||||
</Target>
|
||||
|
||||
<ItemGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))">
|
||||
<Content Include=".\moonlibs\windows\FAudio.dll">
|
||||
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include=".\moonlibs\windows\Refresh.dll">
|
||||
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include=".\moonlibs\windows\SDL2.dll">
|
||||
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))">
|
||||
<Content Include=".\moonlibs\lib64\libFAudio.*">
|
||||
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include=".\moonlibs\lib64\libRefresh.*">
|
||||
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\moonlibs\lib64\libSDL2-2.0.*">
|
||||
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))">
|
||||
<Content Include=".\moonlibs\osx\**\*.*" >
|
||||
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,33 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetName>MoonWorksECSTest</TargetName>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<StartupObject>MoonWorksECSTest.Program</StartupObject>
|
||||
<AssemblyName>MoonWorksECSTest</AssemblyName>
|
||||
<RootNamespace>MoonWorksECSTest</RootNamespace>
|
||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<ApplicationIcon />
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="Content\**\*.*">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<DefaultItemExcludes>$(DefaultItemExcludes);lib\**\*</DefaultItemExcludes>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="lib\MoonWorks\MoonWorks.csproj" />
|
||||
<ProjectReference Include="lib\MoonTools.ECS\MoonTools.ECS.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project=".\CopyMoonlibs.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,49 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30717.126
|
||||
MinimumVisualStudioVersion = 15.0.26124.0
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MoonWorksECSTest.Core", "MoonWorksECSTest\MoonWorksECSTest.Core.csproj", "{4589302C-174A-4173-9654-CAA6CA1B5220}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoonWorksECSTest", "MoonWorksECSTest.csproj", "{E39DD871-69CE-4A7E-B37B-801CEF0EB529}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lib", "lib", "{CD3F5B84-554B-4F6C-B5A7-D17115489A69}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoonWorks", "lib\MoonWorks\MoonWorks.csproj", "{0E99B8AC-F867-4F4E-8596-2918CAE9B6C1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoonTools.ECS", "lib\MoonTools.ECS\MoonTools.ECS.csproj", "{5046E711-F861-4836-B06A-22325AA557A8}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{4589302C-174A-4173-9654-CAA6CA1B5220}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{4589302C-174A-4173-9654-CAA6CA1B5220}.Debug|x64.Build.0 = Debug|x64
|
||||
{4589302C-174A-4173-9654-CAA6CA1B5220}.Release|x64.ActiveCfg = Release|x64
|
||||
{4589302C-174A-4173-9654-CAA6CA1B5220}.Release|x64.Build.0 = Release|x64
|
||||
{E39DD871-69CE-4A7E-B37B-801CEF0EB529}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{E39DD871-69CE-4A7E-B37B-801CEF0EB529}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{E39DD871-69CE-4A7E-B37B-801CEF0EB529}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{E39DD871-69CE-4A7E-B37B-801CEF0EB529}.Release|x64.Build.0 = Release|Any CPU
|
||||
{0E99B8AC-F867-4F4E-8596-2918CAE9B6C1}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0E99B8AC-F867-4F4E-8596-2918CAE9B6C1}.Debug|x64.Build.0 = Debug|x64
|
||||
{0E99B8AC-F867-4F4E-8596-2918CAE9B6C1}.Release|x64.ActiveCfg = Release|x64
|
||||
{0E99B8AC-F867-4F4E-8596-2918CAE9B6C1}.Release|x64.Build.0 = Release|x64
|
||||
{5046E711-F861-4836-B06A-22325AA557A8}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{5046E711-F861-4836-B06A-22325AA557A8}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{5046E711-F861-4836-B06A-22325AA557A8}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{5046E711-F861-4836-B06A-22325AA557A8}.Release|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {70247DA8-9C19-4FC5-B4BC-68E1262B9F4B}
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{0E99B8AC-F867-4F4E-8596-2918CAE9B6C1} = {CD3F5B84-554B-4F6C-B5A7-D17115489A69}
|
||||
{5046E711-F861-4836-B06A-22325AA557A8} = {CD3F5B84-554B-4F6C-B5A7-D17115489A69}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,40 @@
|
|||
# MoonWorksTemplate
|
||||
|
||||
Template and build tasks for developing a cross-platform multi-target .NET 6 MoonWorks project in VSCode.
|
||||
|
||||
The generated solution file will also work in regular Visual Studio.
|
||||
|
||||
NOTE: OSX is broken right now because I need to set up MoltenVK.
|
||||
|
||||
## Features
|
||||
|
||||
- Project boilerplate code
|
||||
- VSCode build tasks
|
||||
- VSCode debugger integration
|
||||
|
||||
## Requirements
|
||||
|
||||
- [Git](https://git-scm.com/) or [Git for Windows](https://gitforwindows.org/) on Windows
|
||||
- [.NET 6 SDK](https://dotnet.microsoft.com/download/dotnet/6.0)
|
||||
- [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) on Windows
|
||||
- [Visual Studio Code](https://code.visualstudio.com/)
|
||||
- [VSCode C# Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp)
|
||||
|
||||
## Installation
|
||||
|
||||
- Make sure you have Git Bash from Git for Windows if you are on Windows
|
||||
- Download this repository
|
||||
- Run `install.sh`
|
||||
- Move the newly created project directory wherever you want
|
||||
- On Windows, add `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin` to your system environment PATH variable after installing Build Tools for VS 2019
|
||||
|
||||
## Usage
|
||||
|
||||
- Open the project directory in VSCode
|
||||
- Press Ctrl-Shift-B to open the build tasks menu
|
||||
- Tasks use .NET 6.0 to build and run
|
||||
- Press F5 to build and debug
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
Thanks to Andrew Russell and Caleb Cornett's FNA templates for a starting point for this template.
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 229a0651bdaac5918b4550866cdca9122bf0d78b
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 8f9aaf6d612b97d77ff5013e758846894777089a
|
|
@ -0,0 +1,9 @@
|
|||
namespace MoonWorksECSTest
|
||||
{
|
||||
public struct InputMessage
|
||||
{
|
||||
public int PlayerIndex;
|
||||
|
||||
public MoonWorks.Input.ButtonState DpadUp;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using MoonTools.ECS;
|
||||
|
||||
namespace MoonWorksECSTest
|
||||
{
|
||||
public class InputSystem : MoonTools.ECS.System
|
||||
{
|
||||
MoonWorks.Input.Inputs Inputs;
|
||||
|
||||
public InputSystem(MoonWorks.Input.Inputs inputs)
|
||||
{
|
||||
Inputs = inputs;
|
||||
}
|
||||
|
||||
public override void Update(TimeSpan delta)
|
||||
{
|
||||
var dpadUp = Inputs.Keyboard.ButtonState(MoonWorks.Input.Keycode.Up);
|
||||
|
||||
var inputMessage = new InputMessage
|
||||
{
|
||||
PlayerIndex = 0,
|
||||
DpadUp = dpadUp
|
||||
};
|
||||
|
||||
Send(inputMessage);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
using MoonWorks.Graphics;
|
||||
using MoonWorks;
|
||||
using MoonTools.ECS;
|
||||
|
||||
namespace MoonWorksECSTest
|
||||
{
|
||||
class MoonWorksECSTestGame : Game
|
||||
{
|
||||
World world;
|
||||
|
||||
public MoonWorksECSTestGame(
|
||||
WindowCreateInfo windowCreateInfo,
|
||||
PresentMode presentMode,
|
||||
bool debugMode
|
||||
) : base(windowCreateInfo, presentMode, 60, debugMode)
|
||||
{
|
||||
var worldBuilder = new WorldBuilder();
|
||||
worldBuilder.AddSystem(new InputSystem(Inputs));
|
||||
worldBuilder.AddSystem(new PositionSystem());
|
||||
|
||||
var entity = worldBuilder.CreateEntity();
|
||||
worldBuilder.Set(entity, new PositionComponent { Position = new MoonWorks.Math.Vector2(200, 200) });
|
||||
|
||||
world = worldBuilder.Build();
|
||||
}
|
||||
|
||||
protected override void Update(System.TimeSpan dt)
|
||||
{
|
||||
world.Update(dt);
|
||||
}
|
||||
|
||||
protected override void Draw(System.TimeSpan dt, double alpha)
|
||||
{
|
||||
var commandBuffer = GraphicsDevice.AcquireCommandBuffer();
|
||||
var swapchainTexture = commandBuffer.AcquireSwapchainTexture(Window);
|
||||
|
||||
commandBuffer.BeginRenderPass(
|
||||
new ColorAttachmentInfo(swapchainTexture, Color.CornflowerBlue)
|
||||
);
|
||||
|
||||
commandBuffer.EndRenderPass();
|
||||
|
||||
GraphicsDevice.Submit(commandBuffer);
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
using MoonWorks.Math;
|
||||
|
||||
namespace MoonWorksECSTest
|
||||
{
|
||||
public struct PositionComponent
|
||||
{
|
||||
public Vector2 Position;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using MoonTools.ECS;
|
||||
|
||||
namespace MoonWorksECSTest
|
||||
{
|
||||
public class PositionSystem : MoonTools.ECS.System
|
||||
{
|
||||
public override void Update(TimeSpan delta)
|
||||
{
|
||||
foreach (var entity in ReadEntities<PositionComponent>())
|
||||
{
|
||||
foreach (var inputMessage in ReadMessages<InputMessage>())
|
||||
{
|
||||
if (inputMessage.DpadUp.IsPressed)
|
||||
{
|
||||
var positionComponent = Get<PositionComponent>(entity);
|
||||
Set(entity, new PositionComponent { Position = new MoonWorks.Math.Vector2(positionComponent.Position.X + 10, positionComponent.Position.Y)});
|
||||
Console.WriteLine("Position: " + Get<PositionComponent>(entity).Position);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using MoonWorks;
|
||||
|
||||
namespace MoonWorksECSTest
|
||||
{
|
||||
class Program
|
||||
{
|
||||
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
static extern bool SetDllDirectory(string lpPathName);
|
||||
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
WindowCreateInfo windowCreateInfo = new WindowCreateInfo
|
||||
{
|
||||
WindowWidth = 1280,
|
||||
WindowHeight = 720,
|
||||
WindowTitle = "MoonWorksECSTest",
|
||||
ScreenMode = ScreenMode.Windowed
|
||||
};
|
||||
|
||||
MoonWorksECSTestGame game = new MoonWorksECSTestGame(
|
||||
windowCreateInfo,
|
||||
MoonWorks.Graphics.PresentMode.FIFORelaxed,
|
||||
true
|
||||
);
|
||||
|
||||
game.Run();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue