Skip to content

Commit

Permalink
Merge pull request #65 from orange-games/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
AleBles authored Jul 10, 2017
2 parents 40a2fc4 + 7877497 commit 6d0d90e
Showing 7 changed files with 30 additions and 7 deletions.
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Before opening this issue _please_ check we haven't already fixed it! Check the [Closed issues](https://github.com/orange-games/phaser-spine/issues?q=is%3Aissue+is%3Aclosed)
This Issue is about (delete as applicable)

* A bug in the API (always say which version you're using!)
* An error in the documentation
* An error in the example
* A problem with my own code

API errors must include example code showing what happens, and why you don't believe this is the expected behavior. Also mention the Phaser version you're using for your project. Issues posted without code take _far_ longer to get resolved, _if ever_.
1 change: 1 addition & 0 deletions build/phaser-spine.d.ts
Original file line number Diff line number Diff line change
@@ -64,6 +64,7 @@ declare module PhaserSpine {
setMixByName(fromName: string, toName: string, duration: number): void;
setAnimationByName(trackIndex: number, animationName: string, loop?: boolean): spine.TrackEntry;
addAnimationByName(trackIndex: number, animationName: string, loop?: boolean, delay?: number): spine.TrackEntry;
getCurrentAnimationForTrack(trackIndex: number): string;
setSkinByName(skinName: string): void;
setSkin(skin: spine.Skin): void;
setToSetupPose(): void;
7 changes: 5 additions & 2 deletions build/phaser-spine.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/phaser-spine.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions build/phaser-spine.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@orange-games/phaser-spine",
"author": "OrangeGames",
"version": "3.0.8",
"version": "3.0.9",
"description": "Spine plugin for Phaser.io!",
"contributors": [
{
10 changes: 10 additions & 0 deletions ts/Spine.ts
Original file line number Diff line number Diff line change
@@ -391,6 +391,16 @@ module PhaserSpine {
return this.state.addAnimation(trackIndex, animation, loop, delay);
};

/**
* get the name of the animation currently playing
*
* @param {number} trackIndex
* @returns {string}
*/
public getCurrentAnimationForTrack(trackIndex: number): string {
return this.state.tracks[trackIndex].animation.name;
}

/**
* Exposing the skeleton's method to change the skin by skinName
* We override the original runtime's error because warnings dont stop the VM

0 comments on commit 6d0d90e

Please sign in to comment.