mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +08:00
[xna] Cleanup of examples assets and code, added missing raptor_normals.png file.
This commit is contained in:
parent
6d83190946
commit
a67e138f90
BIN
spine-xna/example/data/raptor_normals.png
Normal file
BIN
spine-xna/example/data/raptor_normals.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 558 KiB |
@ -125,6 +125,9 @@
|
|||||||
<None Include="data\raptor.png">
|
<None Include="data\raptor.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="data\spineboy-pro.skel">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
<None Include="data\spineboy.png">
|
<None Include="data\spineboy.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
@ -142,9 +145,6 @@
|
|||||||
<None Include="data\tank-pro.json">
|
<None Include="data\tank-pro.json">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="data\tank-pro.skel">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\spine-csharp\spine-csharp.csproj">
|
<ProjectReference Include="..\..\spine-csharp\spine-csharp.csproj">
|
||||||
@ -195,12 +195,6 @@
|
|||||||
<None Include="data\coin-pro.json">
|
<None Include="data\coin-pro.json">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</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">
|
<None Include="data\raptor.atlas">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
@ -210,9 +204,6 @@
|
|||||||
<None Include="data\spineboy.atlas">
|
<None Include="data\spineboy.atlas">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="data\spineboy-ess.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" />
|
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" />
|
||||||
|
|||||||
@ -95,15 +95,14 @@ namespace Spine {
|
|||||||
skeletonDebugRenderer.DisableAll();
|
skeletonDebugRenderer.DisableAll();
|
||||||
skeletonDebugRenderer.DrawClipping = true;
|
skeletonDebugRenderer.DrawClipping = true;
|
||||||
|
|
||||||
// String name = "spineboy-ess";
|
// String name = "spineboy-pro";
|
||||||
// String name = "goblins-pro";
|
|
||||||
String name = "raptor-pro";
|
String name = "raptor-pro";
|
||||||
// String name = "tank-pro";
|
// String name = "tank-pro";
|
||||||
//String name = "coin-pro";
|
//String name = "coin-pro";
|
||||||
if (useNormalmapShader)
|
if (useNormalmapShader)
|
||||||
name = "raptor-pro"; // we only have normalmaps for raptor
|
name = "raptor-pro"; // we only have normalmaps for raptor
|
||||||
String atlasName = name.Replace("-pro", "").Replace("-ess", "");
|
String atlasName = name.Replace("-pro", "").Replace("-ess", "");
|
||||||
if (name == "goblins-pro") atlasName = "goblins-mesh";
|
|
||||||
bool binaryData = false;
|
bool binaryData = false;
|
||||||
|
|
||||||
Atlas atlas;
|
Atlas atlas;
|
||||||
@ -115,7 +114,7 @@ namespace Spine {
|
|||||||
loadMultipleTextureLayers: true, textureSuffixes: new string[] { "", "_normals" }));
|
loadMultipleTextureLayers: true, textureSuffixes: new string[] { "", "_normals" }));
|
||||||
}
|
}
|
||||||
float scale = 1;
|
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 == "raptor-pro") scale = 0.5f;
|
||||||
if (name == "tank-pro") scale = 0.3f;
|
if (name == "tank-pro") scale = 0.3f;
|
||||||
if (name == "coin-pro") scale = 1;
|
if (name == "coin-pro") scale = 1;
|
||||||
@ -125,7 +124,8 @@ namespace Spine {
|
|||||||
SkeletonBinary binary = new SkeletonBinary(atlas);
|
SkeletonBinary binary = new SkeletonBinary(atlas);
|
||||||
binary.Scale = scale;
|
binary.Scale = scale;
|
||||||
skeletonData = binary.ReadSkeletonData(assetsFolder + name + ".skel");
|
skeletonData = binary.ReadSkeletonData(assetsFolder + name + ".skel");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
SkeletonJson json = new SkeletonJson(atlas);
|
SkeletonJson json = new SkeletonJson(atlas);
|
||||||
json.Scale = scale;
|
json.Scale = scale;
|
||||||
skeletonData = json.ReadSkeletonData(assetsFolder + name + ".json");
|
skeletonData = json.ReadSkeletonData(assetsFolder + name + ".json");
|
||||||
@ -137,7 +137,7 @@ namespace Spine {
|
|||||||
AnimationStateData stateData = new AnimationStateData(skeleton.Data);
|
AnimationStateData stateData = new AnimationStateData(skeleton.Data);
|
||||||
state = new AnimationState(stateData);
|
state = new AnimationState(stateData);
|
||||||
|
|
||||||
if (name == "spineboy-ess") {
|
if (name == "spineboy-pro") {
|
||||||
skeleton.SetAttachment("head-bb", "head");
|
skeleton.SetAttachment("head-bb", "head");
|
||||||
|
|
||||||
stateData.SetMix("run", "jump", 0.2f);
|
stateData.SetMix("run", "jump", 0.2f);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user