Parcourir la source

[csharp][xna] Added missing SkeletonLoader.cs file reference to spine-csharp.csproj project file. Updated example project, minor changes.

Harald Csaszar il y a 4 ans
Parent
commit
c223481255

+ 1 - 0
spine-csharp/spine-csharp.csproj

@@ -72,6 +72,7 @@
     <Compile Include="src\Bone.cs" />
     <Compile Include="src\BoneData.cs" />
     <Compile Include="src\ConstraintData.cs" />
+    <Compile Include="src\SkeletonLoader.cs" />
     <Compile Include="src\Triangulator.cs" />
     <Compile Include="src\Event.cs" />
     <Compile Include="src\EventData.cs" />

+ 3 - 12
spine-xna/example/spine-xna-example.csproj

@@ -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" />

+ 4 - 5
spine-xna/example/src/ExampleGame.cs

@@ -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;
@@ -137,7 +136,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);