Skip to content

Commit b1c36fa

Browse files
committed
improved samples
1 parent 1f9657e commit b1c36fa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1172
-17
lines changed

GameSample/GameSample.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,8 @@
4343
<ApplicationManifest>app.manifest</ApplicationManifest>
4444
</PropertyGroup>
4545
<ItemGroup>
46-
<Compile Include="Game1.cs" />
4746
<Compile Include="Program.cs" />
4847
<Compile Include="Properties\AssemblyInfo.cs" />
49-
<Compile Include="SpriteBatchExtensions.cs" />
5048
</ItemGroup>
5149
<ItemGroup>
5250
<Reference Include="MonoGame.Framework, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
@@ -121,6 +119,7 @@
121119
<Name>MonoGame.Spritesheet</Name>
122120
</ProjectReference>
123121
</ItemGroup>
122+
<Import Project="..\Sample.Common\Sample.Common.projitems" Label="Shared" />
124123
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
125124
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" />
126125
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

GameSample/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static class Program
1313
[STAThread]
1414
static void Main()
1515
{
16-
using (var game = new Game1())
16+
using (var game = new Sample.Game1())
1717
game.Run();
1818
}
1919
}

MonoGame.Spritesheet.sln

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,23 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
44
VisualStudioVersion = 15.0.26430.16
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Spritesheet.Pipeline", "MonoGame.Spritesheet.Pipeline\MonoGame.Spritesheet.Pipeline.csproj", "{B6CF4961-729C-4D94-B087-922DE28345C8}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonoGame.Spritesheet.Pipeline", "MonoGame.Spritesheet.Pipeline\MonoGame.Spritesheet.Pipeline.csproj", "{B6CF4961-729C-4D94-B087-922DE28345C8}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Spritesheet", "MonoGame.Spritesheet\MonoGame.Spritesheet.csproj", "{FE6D8C5F-6F96-4449-A815-40C115C68311}"
9-
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameSample", "GameSample\GameSample.csproj", "{D2853C99-C783-4743-9097-A111FA0DDCBE}"
11-
ProjectSection(ProjectDependencies) = postProject
12-
{B6CF4961-729C-4D94-B087-922DE28345C8} = {B6CF4961-729C-4D94-B087-922DE28345C8}
13-
EndProjectSection
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonoGame.Spritesheet", "MonoGame.Spritesheet\MonoGame.Spritesheet.csproj", "{FE6D8C5F-6F96-4449-A815-40C115C68311}"
149
EndProject
1510
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FBA99289-02B6-4FB9-8791-7DAF83ED7B4F}"
1611
ProjectSection(SolutionItems) = preProject
1712
GitVersionWorkaround.targets = GitVersionWorkaround.targets
1813
EndProjectSection
1914
EndProject
15+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{B4F3FD3A-053E-4082-8F3C-E381B5A56436}"
16+
EndProject
17+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.DesktopGL", "Samples\Sample.DesktopGL\Sample.DesktopGL.csproj", "{0F3467B1-DBDC-4B7E-BF0F-F5A68B2E4CA1}"
18+
EndProject
19+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample", "Samples\Sample\Sample.csproj", "{60594BB1-75CD-4F0F-9227-69395D7FD0D9}"
20+
EndProject
21+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Android", "Samples\Sample.Android\Sample.Android.csproj", "{F9C6D599-E1CC-438C-8D81-3BDCD47553E3}"
22+
EndProject
2023
Global
2124
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2225
Debug|Any CPU = Debug|Any CPU
@@ -31,12 +34,27 @@ Global
3134
{FE6D8C5F-6F96-4449-A815-40C115C68311}.Debug|Any CPU.Build.0 = Debug|Any CPU
3235
{FE6D8C5F-6F96-4449-A815-40C115C68311}.Release|Any CPU.ActiveCfg = Release|Any CPU
3336
{FE6D8C5F-6F96-4449-A815-40C115C68311}.Release|Any CPU.Build.0 = Release|Any CPU
34-
{D2853C99-C783-4743-9097-A111FA0DDCBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35-
{D2853C99-C783-4743-9097-A111FA0DDCBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
36-
{D2853C99-C783-4743-9097-A111FA0DDCBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
37-
{D2853C99-C783-4743-9097-A111FA0DDCBE}.Release|Any CPU.Build.0 = Release|Any CPU
37+
{0F3467B1-DBDC-4B7E-BF0F-F5A68B2E4CA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38+
{0F3467B1-DBDC-4B7E-BF0F-F5A68B2E4CA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
39+
{0F3467B1-DBDC-4B7E-BF0F-F5A68B2E4CA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
40+
{0F3467B1-DBDC-4B7E-BF0F-F5A68B2E4CA1}.Release|Any CPU.Build.0 = Release|Any CPU
41+
{60594BB1-75CD-4F0F-9227-69395D7FD0D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42+
{60594BB1-75CD-4F0F-9227-69395D7FD0D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
43+
{60594BB1-75CD-4F0F-9227-69395D7FD0D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
44+
{60594BB1-75CD-4F0F-9227-69395D7FD0D9}.Release|Any CPU.Build.0 = Release|Any CPU
45+
{F9C6D599-E1CC-438C-8D81-3BDCD47553E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46+
{F9C6D599-E1CC-438C-8D81-3BDCD47553E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
47+
{F9C6D599-E1CC-438C-8D81-3BDCD47553E3}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
48+
{F9C6D599-E1CC-438C-8D81-3BDCD47553E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
49+
{F9C6D599-E1CC-438C-8D81-3BDCD47553E3}.Release|Any CPU.Build.0 = Release|Any CPU
50+
{F9C6D599-E1CC-438C-8D81-3BDCD47553E3}.Release|Any CPU.Deploy.0 = Release|Any CPU
3851
EndGlobalSection
3952
GlobalSection(SolutionProperties) = preSolution
4053
HideSolutionNode = FALSE
4154
EndGlobalSection
55+
GlobalSection(NestedProjects) = preSolution
56+
{0F3467B1-DBDC-4B7E-BF0F-F5A68B2E4CA1} = {B4F3FD3A-053E-4082-8F3C-E381B5A56436}
57+
{60594BB1-75CD-4F0F-9227-69395D7FD0D9} = {B4F3FD3A-053E-4082-8F3C-E381B5A56436}
58+
{F9C6D599-E1CC-438C-8D81-3BDCD47553E3} = {B4F3FD3A-053E-4082-8F3C-E381B5A56436}
59+
EndGlobalSection
4260
EndGlobal

Samples/Content/Content.mgcb

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
2+
#----------------------------- Global Properties ----------------------------#
3+
4+
/outputDir:bin/$(Platform)
5+
/intermediateDir:obj/$(Platform)
6+
/platform:DesktopGL
7+
/config:
8+
/profile:Reach
9+
/compress:False
10+
11+
#-------------------------------- References --------------------------------#
12+
13+
/reference:..\..\MonoGame.Spritesheet.Pipeline\bin\Release\net45\MonoGame.Spritesheet.Pipeline.dll
14+
15+
#---------------------------------- Content ---------------------------------#
16+
17+
#begin character.png
18+
/importer:TextureImporter
19+
/processor:SheetProcessor
20+
/processorParam:ColorKeyColor=255,0,255,255
21+
/processorParam:ColorKeyEnabled=True
22+
/processorParam:PremultiplyAlpha=True
23+
/processorParam:ResizeToPowerOfTwo=False
24+
/processorParam:MakeSquare=False
25+
/processorParam:TextureFormat=Color
26+
/processorParam:Padding=1
27+
/processorParam:SheetData=character.json
28+
/build:character.png
29+
30+
#begin Overworld.png
31+
/importer:TextureImporter
32+
/processor:GridSheetProcessor
33+
/processorParam:ColorKeyColor=255,0,255,255
34+
/processorParam:ColorKeyEnabled=True
35+
/processorParam:GenerateMipmaps=False
36+
/processorParam:PremultiplyAlpha=True
37+
/processorParam:ResizeToPowerOfTwo=False
38+
/processorParam:MakeSquare=False
39+
/processorParam:TextureFormat=Color
40+
/processorParam:SpriteWidth=16
41+
/processorParam:SpriteHeight=16
42+
/processorParam:Padding=0
43+
/build:Overworld.png
44+
45+
#begin Enemy.json
46+
/importer:SheetFolderImporter
47+
/processor:SheetFolderProcessor
48+
/processorParam:ColorKeyColor=255,0,255,255
49+
/processorParam:ColorKeyEnabled=True
50+
/processorParam:PremultiplyAlpha=True
51+
/processorParam:ResizeToPowerOfTwo=False
52+
/processorParam:MakeSquare=False
53+
/processorParam:TextureFormat=Color
54+
/processorParam:Padding=1
55+
/build:Enemy.json
56+

Samples/Content/Enemy.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"FolderPath": "EnemyImages",
3+
"Filter": "*.png"
4+
}
432 Bytes
Loading
406 Bytes
Loading
365 Bytes
Loading
377 Bytes
Loading
396 Bytes
Loading

0 commit comments

Comments
 (0)