mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[csharp][xna] Added missing SkeletonLoader.cs file reference to spine-csharp.csproj project file. Updated example project, minor changes.
This commit is contained in:
parent
abf35ec712
commit
c223481255
@ -72,6 +72,7 @@
|
|||||||
<Compile Include="src\Bone.cs" />
|
<Compile Include="src\Bone.cs" />
|
||||||
<Compile Include="src\BoneData.cs" />
|
<Compile Include="src\BoneData.cs" />
|
||||||
<Compile Include="src\ConstraintData.cs" />
|
<Compile Include="src\ConstraintData.cs" />
|
||||||
|
<Compile Include="src\SkeletonLoader.cs" />
|
||||||
<Compile Include="src\Triangulator.cs" />
|
<Compile Include="src\Triangulator.cs" />
|
||||||
<Compile Include="src\Event.cs" />
|
<Compile Include="src\Event.cs" />
|
||||||
<Compile Include="src\EventData.cs" />
|
<Compile Include="src\EventData.cs" />
|
||||||
|
|||||||
@ -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;
|
||||||
@ -137,7 +136,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