[xna] Cleanup of examples assets and code, added missing raptor_normals.png file.

This commit is contained in:
Harald Csaszar 2020-11-19 19:53:05 +01:00
parent 6d83190946
commit a67e138f90
3 changed files with 9 additions and 18 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 KiB

View File

@ -125,6 +125,9 @@
<None Include="data\raptor.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="data\spineboy-pro.skel">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="data\spineboy.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
@ -142,9 +145,6 @@
<None Include="data\tank-pro.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="data\tank-pro.skel">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\spine-csharp\spine-csharp.csproj">
@ -195,12 +195,6 @@
<None Include="data\coin-pro.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="data\goblins-pro.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="data\goblins-pro.skel">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="data\raptor.atlas">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
@ -210,9 +204,6 @@
<None Include="data\spineboy.atlas">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="data\spineboy-ess.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" />

View File

@ -95,15 +95,14 @@ namespace Spine {
skeletonDebugRenderer.DisableAll();
skeletonDebugRenderer.DrawClipping = true;
// String name = "spineboy-ess";
// String name = "goblins-pro";
// String name = "spineboy-pro";
String name = "raptor-pro";
// String name = "tank-pro";
//String name = "coin-pro";
if (useNormalmapShader)
name = "raptor-pro"; // we only have normalmaps for raptor
String atlasName = name.Replace("-pro", "").Replace("-ess", "");
if (name == "goblins-pro") atlasName = "goblins-mesh";
bool binaryData = false;
Atlas atlas;
@ -115,7 +114,7 @@ namespace Spine {
loadMultipleTextureLayers: true, textureSuffixes: new string[] { "", "_normals" }));
}
float scale = 1;
if (name == "spineboy-ess") scale = 0.6f;
if (name == "spineboy-pro") scale = 0.6f;
if (name == "raptor-pro") scale = 0.5f;
if (name == "tank-pro") scale = 0.3f;
if (name == "coin-pro") scale = 1;
@ -125,7 +124,8 @@ namespace Spine {
SkeletonBinary binary = new SkeletonBinary(atlas);
binary.Scale = scale;
skeletonData = binary.ReadSkeletonData(assetsFolder + name + ".skel");
} else {
}
else {
SkeletonJson json = new SkeletonJson(atlas);
json.Scale = scale;
skeletonData = json.ReadSkeletonData(assetsFolder + name + ".json");
@ -137,7 +137,7 @@ namespace Spine {
AnimationStateData stateData = new AnimationStateData(skeleton.Data);
state = new AnimationState(stateData);
if (name == "spineboy-ess") {
if (name == "spineboy-pro") {
skeleton.SetAttachment("head-bb", "head");
stateData.SetMix("run", "jump", 0.2f);