Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
Evan Hemsley | c79ac15ab1 | |
Evan Hemsley | d22954e503 | |
Evan Hemsley | ce9c3cd89e | |
Evan Hemsley | b5c7d76517 | |
Evan Hemsley | 74d4e231d2 | |
Evan Hemsley | 4496e9670a |
|
@ -1,3 +0,0 @@
|
|||
[submodule "FNA"]
|
||||
path = FNA
|
||||
url = https://github.com/FNA-XNA/FNA.git
|
1
FNA
1
FNA
|
@ -1 +0,0 @@
|
|||
Subproject commit d5dd19a87b0046575172df9156ef1043ac8209d3
|
|
@ -0,0 +1 @@
|
|||
Put your Component structs here.
|
|
@ -0,0 +1 @@
|
|||
Put your Engine classes here.
|
|
@ -0,0 +1 @@
|
|||
Put your Message structs here.
|
|
@ -24,6 +24,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FNA\FNA.Core.csproj"/>
|
||||
<ProjectReference Include="..\encompass-cs\encompass-cs\encompass-cs.csproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="..\build\CopyFNALibs.targets"/>
|
||||
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FNA\FNA.csproj"/>
|
||||
<ProjectReference Include="..\encompass-cs\encompass-cs\encompass-cs.csproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="..\build\CopyFNALibs.targets"/>
|
||||
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Encompass;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
|
@ -7,6 +8,9 @@ namespace ProjectName
|
|||
{
|
||||
GraphicsDeviceManager graphics;
|
||||
|
||||
WorldBuilder WorldBuilder { get; } = new WorldBuilder();
|
||||
World World { get; set; }
|
||||
|
||||
public ProjectNameGame()
|
||||
{
|
||||
graphics = new GraphicsDeviceManager(this);
|
||||
|
@ -21,7 +25,7 @@ namespace ProjectName
|
|||
|
||||
protected override void LoadContent()
|
||||
{
|
||||
base.LoadContent();
|
||||
World = WorldBuilder.Build();
|
||||
}
|
||||
|
||||
protected override void UnloadContent()
|
||||
|
@ -31,21 +35,17 @@ namespace ProjectName
|
|||
|
||||
protected override void Update(GameTime gameTime)
|
||||
{
|
||||
//
|
||||
// Insert your game update logic here.
|
||||
//
|
||||
World.Update(gameTime.ElapsedGameTime.TotalSeconds);
|
||||
|
||||
base.Update(gameTime);
|
||||
}
|
||||
|
||||
protected override void Draw(GameTime gameTime)
|
||||
{
|
||||
//
|
||||
// Replace this with your own drawing code.
|
||||
//
|
||||
|
||||
GraphicsDevice.Clear(Color.CornflowerBlue);
|
||||
|
||||
World.Draw();
|
||||
|
||||
base.Draw(gameTime);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Put your Renderer classes here.
|
|
@ -0,0 +1 @@
|
|||
Put your static Utility classes here.
|
46
install.sh
46
install.sh
|
@ -7,6 +7,11 @@
|
|||
# Get the directory of this script
|
||||
MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
FNA_VERSION=20.07
|
||||
ENCOMPASS_VERSION=0.21.1
|
||||
|
||||
readlinkf(){ perl -MCwd -e 'print Cwd::abs_path shift' "$1";}
|
||||
|
||||
# Checks if git is installed
|
||||
function checkGit()
|
||||
{
|
||||
|
@ -17,11 +22,15 @@ function checkGit()
|
|||
fi
|
||||
}
|
||||
|
||||
# Pulls FNA from the git master branch
|
||||
# Pulls FNA from github
|
||||
function pullFNA()
|
||||
{
|
||||
checkGit
|
||||
echo "Updating to the latest git version of FNA..."
|
||||
git submodule add https://github.com/FNA-XNA/FNA.git
|
||||
cd FNA
|
||||
git checkout $FNA_VERSION
|
||||
cd ..
|
||||
echo "Updating to the latest version of FNA..."
|
||||
git submodule update --init --recursive
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Finished updating!"
|
||||
|
@ -31,6 +40,23 @@ function pullFNA()
|
|||
fi
|
||||
}
|
||||
|
||||
# Pulls Encompass from gitea
|
||||
function pullEncompass()
|
||||
{
|
||||
checkGit
|
||||
echo "Updating to latest version of Encompass..."
|
||||
git submodule add https://gitea.moonside.games/MoonsideGames/encompass-cs.git
|
||||
cd encompass-cs
|
||||
git checkout $ENCOMPASS_VERSION
|
||||
cd ..
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Finished updating!"
|
||||
else
|
||||
echo >&2 "ERROR: Unable to update."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Downloads and extracts prepackaged archive of native libraries ("fnalibs")
|
||||
function getLibs()
|
||||
{
|
||||
|
@ -59,7 +85,6 @@ function getLibs()
|
|||
}
|
||||
|
||||
getLibs
|
||||
pullFNA
|
||||
|
||||
read -p "Enter your project name or 'exit' to quit: " newProjectName
|
||||
if [[ $newProjectName = 'exit' || -z "$newProjectName" ]]; then
|
||||
|
@ -74,6 +99,7 @@ cd "$NEW_PROJECT_DIR"
|
|||
files=(ProjectName.Core.sln ProjectName.Framework.sln .gitignore ProjectName/ProjectName.Core.csproj ProjectName/ProjectName.Framework.csproj ProjectName/ProjectNameGame.cs ProjectName/Program.cs .vscode/tasks.json .vscode/launch.json)
|
||||
for file in "${files[@]}"; do
|
||||
sed -i -e "s/ProjectName/$newProjectName/g" "./$file"
|
||||
rm ./${file}-e
|
||||
done
|
||||
|
||||
mv ./ProjectName.Core.sln "./$newProjectName.Core.sln"
|
||||
|
@ -83,5 +109,17 @@ mv ./ProjectName/ProjectName.Framework.csproj "./ProjectName/$newProjectName.Fra
|
|||
mv ./ProjectName/ProjectNameGame.cs ./ProjectName/${newProjectName}Game.cs
|
||||
mv ./ProjectName "./$newProjectName"
|
||||
rm ./install.sh
|
||||
rm ./LICENSE
|
||||
|
||||
echo "Project $newProjectName created at $(readlink -f $NEW_PROJECT_DIR)"
|
||||
rm -rf .git
|
||||
git init
|
||||
pullFNA
|
||||
pullEncompass
|
||||
|
||||
echo "Project $newProjectName created at: "
|
||||
|
||||
if [ "$(uname)" == "Darwin" ]; then
|
||||
echo $(readlinkf $NEW_PROJECT_DIR)
|
||||
else
|
||||
echo $(readlink -f $NEW_PROJECT_DIR)
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue