mirror of
https://github.com/prime31/FNA-VSCode-Template.git
synced 2025-10-31 21:50:44 +07:00
getting closer to zero config
This commit is contained in:
parent
5e618eca79
commit
4a49a86ae7
9
.gitignore
vendored
9
.gitignore
vendored
@ -1,6 +1,9 @@
|
||||
.DS_Store
|
||||
FNA/
|
||||
fnalibs/
|
||||
project_name/bin/
|
||||
project_name/obj/
|
||||
project_name/CompiledContent/.mgstats
|
||||
Shitty/bin
|
||||
Shitty/CompiledContent/bin
|
||||
Shitty/CompiledContent/obj
|
||||
.mgstats
|
||||
Shitty/obj
|
||||
|
||||
|
||||
17
getFNA.sh
17
getFNA.sh
@ -95,7 +95,11 @@ fi
|
||||
|
||||
|
||||
# Rename project
|
||||
read -p "Enter the project name to use for your folder and csproj file: " newProjectName
|
||||
read -p "Enter the project name to use for your folder and csproj file or 'exit' to quit: " newProjectName
|
||||
if [[ $newProjectName = 'exit' ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sed -i '' "s/project_name/$newProjectName/g" project_name/project_name.csproj
|
||||
sed -i '' "s/project_name/$newProjectName/g" project_name/Game1.cs
|
||||
sed -i '' "s/project_name/$newProjectName/g" project_name/Program.cs
|
||||
@ -104,3 +108,14 @@ sed -i '' "s/project_name/$newProjectName/g" project_name/.vscode/launch.json
|
||||
|
||||
mv project_name/project_name.csproj "project_name/$newProjectName.csproj"
|
||||
mv project_name "$newProjectName"
|
||||
|
||||
git init
|
||||
git submodule add git@github.com:prime31/Nez.FNA.git
|
||||
cd Nez.FNA
|
||||
git submodule init
|
||||
git submodule update
|
||||
|
||||
sleep 10
|
||||
|
||||
nuget restore Nez.FNA/Nez/Nez.sln
|
||||
msbuild Nez.FNA/Nez/Nez.sln
|
||||
1
project_name/.vscode/tasks.json
vendored
1
project_name/.vscode/tasks.json
vendored
@ -27,6 +27,7 @@
|
||||
],
|
||||
"group": "build",
|
||||
"problemMatcher": "$msCompile",
|
||||
"dependsOn": "Build Content",
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@ -16,3 +16,15 @@
|
||||
/reference:../../Nez.FNA/Nez/Nez.PipelineImporter/bin/Debug/Nez.dll
|
||||
|
||||
#---------------------------------- Content ---------------------------------#
|
||||
|
||||
#begin nez-logo-black.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:nez-logo-black.png
|
||||
BIN
project_name/CompiledContent/nez-logo-black.png
Normal file
BIN
project_name/CompiledContent/nez-logo-black.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@ -1,38 +1,27 @@
|
||||
using System;
|
||||
using Nez;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace project_name
|
||||
{
|
||||
class Game1 : Game
|
||||
class Game1 : Core
|
||||
{
|
||||
GraphicsDeviceManager graphics;
|
||||
|
||||
public Game1()
|
||||
{
|
||||
graphics = new GraphicsDeviceManager(this);
|
||||
Content.RootDirectory = "Content";
|
||||
}
|
||||
public Game1() : base()
|
||||
{}
|
||||
|
||||
override protected void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
}
|
||||
|
||||
var newScene = new Scene();
|
||||
newScene.addRenderer(new DefaultRenderer());
|
||||
|
||||
override protected void LoadContent()
|
||||
{
|
||||
base.LoadContent();
|
||||
}
|
||||
var logo = newScene.content.Load<Microsoft.Xna.Framework.Graphics.Texture2D>("nez-logo-black");
|
||||
newScene.createEntity("logo")
|
||||
.setPosition(Screen.center)
|
||||
.addComponent(new Nez.Sprites.Sprite(logo));
|
||||
|
||||
override protected void Update(GameTime gameTime)
|
||||
{
|
||||
base.Update(gameTime);
|
||||
}
|
||||
|
||||
override protected void Draw(GameTime gameTime)
|
||||
{
|
||||
GraphicsDevice.Clear(Color.CornflowerBlue);
|
||||
|
||||
base.Draw(gameTime);
|
||||
scene = newScene;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -11,6 +11,7 @@
|
||||
<!-- Reference FNA project -->
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../FNA/FNA.csproj" />
|
||||
<ProjectReference Include="../Nez.FNA/Nez.FNA/Nez.FNA.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Include the Content directory (except for .fx files, since we use .fxb at runtime) -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user