mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[haxe] Port to 4.3 (WIP) - Fixing examples.
This commit is contained in:
parent
a06a34c881
commit
d7212370f6
@ -51,7 +51,7 @@ class SackExample extends FlxState {
|
|||||||
button.setPosition(FlxG.width * .75, FlxG.height / 10);
|
button.setPosition(FlxG.width * .75, FlxG.height / 10);
|
||||||
add(button);
|
add(button);
|
||||||
|
|
||||||
var atlas = new TextureAtlas(Assets.getText("assets/sack.atlas"), new FlixelTextureLoader("assets/sack.atlas"));
|
var atlas = new TextureAtlas(Assets.getText("assets/7-anticipation.atlas"), new FlixelTextureLoader("assets/7-anticipation.atlas"));
|
||||||
var data = SkeletonData.from(loadBinary ? Assets.getBytes("assets/sack-pro.skel") : Assets.getText("assets/sack-pro.json"), atlas, .25);
|
var data = SkeletonData.from(loadBinary ? Assets.getBytes("assets/sack-pro.skel") : Assets.getText("assets/sack-pro.json"), atlas, .25);
|
||||||
var animationStateData = new AnimationStateData(data);
|
var animationStateData = new AnimationStateData(data);
|
||||||
animationStateData.defaultMix = 0.25;
|
animationStateData.defaultMix = 0.25;
|
||||||
|
|||||||
@ -47,7 +47,7 @@ class SackExample extends Scene {
|
|||||||
public function load():Void {
|
public function load():Void {
|
||||||
background.color = 0x333333;
|
background.color = 0x333333;
|
||||||
|
|
||||||
var atlas = new TextureAtlas(Assets.getText("assets/sack.atlas"), new StarlingTextureLoader("assets/sack.atlas"));
|
var atlas = new TextureAtlas(Assets.getText("assets/7-anticipation.atlas"), new StarlingTextureLoader("assets/7-anticipation.atlas"));
|
||||||
var skeletondata = SkeletonData.from(Assets.getText("assets/sack-pro.json"), atlas);
|
var skeletondata = SkeletonData.from(Assets.getText("assets/sack-pro.json"), atlas);
|
||||||
|
|
||||||
var animationStateData = new AnimationStateData(skeletondata);
|
var animationStateData = new AnimationStateData(skeletondata);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user