Removed stretchyman-stretchy-ik from all examples.

This commit is contained in:
badlogic 2019-08-05 17:41:15 +02:00
parent bb51ec7f23
commit e039625430
8 changed files with 4 additions and 121 deletions

View File

@ -129,11 +129,10 @@ end
table.insert(skeletons, loadSkeleton("mix-and-match.atlas", "mix-and-match-pro.json", 240, 300, 0.3, "dance"))
table.insert(skeletons, loadSkeleton("spineboy.atlas", "spineboy-pro.json", 240, 300, 0.4, "walk"))
table.insert(skeletons, loadSkeleton("stretchyman.atlas", "stretchyman-stretchy-ik-pro.json", 40, 300, 0.5, "sneak"))
table.insert(skeletons, loadSkeleton("stretchyman.atlas", "stretchyman-pro.json", 40, 300, 0.5, "sneak"))
table.insert(skeletons, loadSkeleton("coin.atlas", "coin-pro.json", 240, 160, 0.4, "animation"))
table.insert(skeletons, loadSkeleton("raptor.atlas", "raptor-pro.json", 200, 300, 0.25, "walk"))
table.insert(skeletons, loadSkeleton("goblins.atlas", "goblins-pro.json", 240, 300, 0.8, "walk", "goblin"))
table.insert(skeletons, loadSkeleton("stretchyman.atlas", "stretchyman-pro.json", 40, 300, 0.5, "sneak"))
table.insert(skeletons, loadSkeleton("tank.atlas", "tank-pro.json", 400, 300, 0.2, "drive"))
table.insert(skeletons, loadSkeleton("vine.atlas", "vine-pro.json", 240, 300, 0.3, "grow"))

View File

@ -115,13 +115,12 @@ function love.load(arg)
skeletonRenderer = spine.SkeletonRenderer.new(true)
table.insert(skeletons, loadSkeleton("mix-and-match-pro", "mix-and-match", "dance", nil, 0.5, 400, 500))
table.insert(skeletons, loadSkeleton("spineboy-pro", "spineboy", "walk", nil, 0.5, 400, 500))
table.insert(skeletons, loadSkeleton("stretchyman-pro", "stretchyman", "sneak", nil, 0.3, 200, 500))
table.insert(skeletons, loadSkeleton("stretchyman-pro", "stretchyman", "sneak", nil, 0.5, 200, 500))
table.insert(skeletons, loadSkeleton("coin-pro", "coin", "animation", nil, 0.5, 400, 300))
table.insert(skeletons, loadSkeleton("raptor-pro", "raptor", "walk", nil, 0.3, 400, 500))
table.insert(skeletons, loadSkeleton("goblins-pro", "goblins", "walk", "goblin", 1, 400, 500))
table.insert(skeletons, loadSkeleton("tank-pro", "tank", "drive", nil, 0.2, 600, 500))
table.insert(skeletons, loadSkeleton("vine-pro", "vine", "grow", nil, 0.3, 400, 500))
table.insert(skeletons, loadSkeleton("stretchyman-stretchy-ik-pro", "stretchyman", "sneak", nil, 0.3, 200, 500))
end
function love.update (delta)

View File

@ -556,7 +556,6 @@ int main () {
testcase(goblins, "data/goblins-pro.json", "data/goblins-pro.skel", "data/goblins-pma.atlas", 1.4f);
testcase(test, "data/tank-pro.json", "data/tank-pro.skel", "data/tank-pma.atlas", 1.0f);
testcase(spineboy, "data/spineboy-pro.json", "data/spineboy-pro.skel", "data/spineboy-pma.atlas", 0.6f);
testcase(stretchyman, "data/stretchyman-stretchy-ik-pro.json", "data/stretchyman-stretchy-ik-pro.skel", "data/stretchyman-pma.atlas", 0.6f);
testcase(owl, "data/owl-pro.json", "data/owl-pro.skel", "data/owl-pma.atlas", 0.5f);
testcase(coin, "data/coin-pro.json", "data/coin-pro.skel", "data/coin-pma.atlas", 0.5f);
testcase(vine, "data/vine-pro.json", "data/vine-pro.skel", "data/vine-pma.atlas", 0.5f);

View File

@ -544,7 +544,6 @@ int main () {
testcase(goblins, "data/goblins-pro.json", "data/goblins-pro.skel", "data/goblins-pma.atlas", 1.4f);
testcase(owl, "data/owl-pro.json", "data/owl-pro.skel", "data/owl-pma.atlas", 0.5f);
testcase(spineboy, "data/spineboy-pro.json", "data/spineboy-pro.skel", "data/spineboy-pma.atlas", 0.6f);
testcase(stretchymanStrechyIk, "data/stretchyman-stretchy-ik-pro.json", "data/stretchyman-stretchy-ik-pro.skel", "data/stretchyman-pma.atlas", 0.6f);
testcase(raptor, "data/raptor-pro.json", "data/raptor-pro.skel", "data/raptor-pma.atlas", 0.5f);
testcase(coin, "data/coin-pro.json", "data/coin-pro.skel", "data/coin-pma.atlas", 0.5f);
testcase(vine, "data/vine-pro.json", "data/vine-pro.skel", "data/vine-pma.atlas", 0.5f);

View File

@ -1,5 +1,4 @@
eclipse.preferences.version=1
encoding//src/spine/examples/StretchymanStrechyIkExample.as=UTF-8
encoding//src/spine/examples/TankExample.as=UTF-8
encoding//src/spine/examples/TwoColorExample.as=UTF-8
encoding/<project>=UTF-8

View File

@ -103,7 +103,7 @@ package spine.examples {
if (touch && touch.phase == TouchPhase.BEGAN) {
var parent: DisplayObjectContainer = this.parent;
this.removeFromParent(true);
parent.addChild(new StretchymanStrechyIkExample());
parent.addChild(new CoinExample());
}
}
}

View File

@ -1,110 +0,0 @@
/******************************************************************************
* Spine Runtimes License Agreement
* Last updated May 1, 2019. Replaces all prior versions.
*
* Copyright (c) 2013-2019, Esoteric Software LLC
*
* Integration of the Spine Runtimes into software or otherwise creating
* derivative works of the Spine Runtimes is permitted under the terms and
* conditions of Section 2 of the Spine Editor License Agreement:
* http://esotericsoftware.com/spine-editor-license
*
* Otherwise, it is permitted to integrate the Spine Runtimes into software
* or otherwise create derivative works of the Spine Runtimes (collectively,
* "Products"), provided that each user of the Products must obtain their own
* Spine Editor license and redistribution of the Products in any form must
* include this license and copyright notice.
*
* THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS
* INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
package spine.examples {
import starling.display.DisplayObjectContainer;
import starling.events.TouchPhase;
import starling.events.Touch;
import starling.events.TouchEvent;
import spine.*;
import spine.animation.AnimationStateData;
import spine.animation.TrackEntry;
import spine.atlas.Atlas;
import spine.attachments.AtlasAttachmentLoader;
import spine.attachments.AttachmentLoader;
import spine.starling.SkeletonAnimation;
import spine.starling.StarlingTextureLoader;
import starling.core.Starling;
import starling.display.Sprite;
public class StretchymanStrechyIkExample extends Sprite {
[Embed(source = "/stretchyman-stretchy-ik-pro.json", mimeType = "application/octet-stream")]
static public const StretchymanJson : Class;
[Embed(source = "/stretchyman.atlas", mimeType = "application/octet-stream")]
static public const StretchymanAtlas : Class;
[Embed(source = "/stretchyman.png")]
static public const StretchymanAtlasTexture : Class;
private var skeleton : SkeletonAnimation;
public function StretchymanStrechyIkExample() {
var spineAtlas : Atlas = new Atlas(new StretchymanAtlas(), new StarlingTextureLoader(new StretchymanAtlasTexture()));
var attachmentLoader : AttachmentLoader = new AtlasAttachmentLoader(spineAtlas);
var json : SkeletonJson = new SkeletonJson(attachmentLoader);
json.scale = 0.4;
var skeletonData : SkeletonData = json.readSkeletonData(new StretchymanJson());
var stateData : AnimationStateData = new AnimationStateData(skeletonData);
skeleton = new SkeletonAnimation(skeletonData, stateData);
skeleton.x = 100;
skeleton.y = 560;
skeleton.state.timeScale = 0.1;
skeleton.state.onStart.add(function(entry : TrackEntry) : void {
trace(entry.trackIndex + " start: " + entry.animation.name);
});
skeleton.state.onInterrupt.add(function(entry : TrackEntry) : void {
trace(entry.trackIndex + " interrupt: " + entry.animation.name);
});
skeleton.state.onEnd.add(function(entry : TrackEntry) : void {
trace(entry.trackIndex + " end: " + entry.animation.name);
});
skeleton.state.onComplete.add(function(entry : TrackEntry) : void {
trace(entry.trackIndex + " complete: " + entry.animation.name);
});
skeleton.state.onDispose.add(function(entry : TrackEntry) : void {
trace(entry.trackIndex + " dispose: " + entry.animation.name);
});
skeleton.state.onEvent.add(function(entry : TrackEntry, event : Event) : void {
trace(entry.trackIndex + " event: " + entry.animation.name + ", " + event.data.name + ": " + event.intValue + ", " + event.floatValue + ", " + event.stringValue);
});
skeleton.skeleton.setToSetupPose();
skeleton.state.setAnimationByName(0, "sneak", true);
addChild(skeleton);
Starling.juggler.add(skeleton);
addEventListener(TouchEvent.TOUCH, onClick);
}
private function onClick(event : TouchEvent) : void {
var touch : Touch = event.getTouch(this);
if (touch && touch.phase == TouchPhase.BEGAN) {
var parent: DisplayObjectContainer = this.parent;
this.removeFromParent(true);
parent.addChild(new CoinExample());
}
}
}
}

View File

@ -78,7 +78,6 @@ function init () {
assetManager.loadTextureAtlas("assets/vine-pma.atlas");
assetManager.loadBinary("assets/stretchyman-pro.skel");
assetManager.loadTextureAtlas("assets/stretchyman-pma.atlas");
assetManager.loadBinary("assets/stretchyman-stretchy-ik-pro.skel");
assetManager.loadBinary("assets/coin-pro.skel");
assetManager.loadTextureAtlas("assets/coin-pma.atlas");
requestAnimationFrame(load);
@ -93,7 +92,6 @@ function load () {
skeletons["goblins"] = loadSkeleton("goblins-pro", "walk", true, "goblin");
skeletons["vine"] = loadSkeleton("vine-pro", "grow", true);
skeletons["stretchyman"] = loadSkeleton("stretchyman-pro", "sneak", true);
skeletons["stretchyman-stretchy-ik"] = loadSkeleton("stretchyman-stretchy-ik-pro", "sneak", true);
skeletons["coin"] = loadSkeleton("coin-pro", "animation", true);
setupUI();
requestAnimationFrame(render);
@ -106,7 +104,7 @@ function loadSkeleton (name, initialAnimation, premultipliedAlpha, skin) {
if (skin === undefined) skin = "default";
// Load the texture atlas using name.atlas from the AssetManager.
atlas = assetManager.get("assets/" + name.replace("-ess", "").replace("-pro", "").replace("-stretchy-ik", "") + (premultipliedAlpha ? "-pma": "") + ".atlas");
atlas = assetManager.get("assets/" + name.replace("-ess", "").replace("-pro", "") + (premultipliedAlpha ? "-pma": "") + ".atlas");
// Create a AtlasAttachmentLoader that resolves region, mesh, boundingbox and path attachments
atlasLoader = new spine.AtlasAttachmentLoader(atlas);