From a59784c960aaa93487b930c9c32d4ef7f8fe5b5d Mon Sep 17 00:00:00 2001 From: photonstorm Date: Mon, 26 Jun 2017 14:52:58 +0100 Subject: [PATCH] Added GetCurrentKey to Animation class. --- v3/src/components/Animation.js | 1 + v3/src/components/animation/GetCurrentKey.js | 9 +++++++++ v3/src/components/animation/index.js | 1 + 3 files changed, 11 insertions(+) create mode 100644 v3/src/components/animation/GetCurrentKey.js diff --git a/v3/src/components/Animation.js b/v3/src/components/Animation.js index 894cd5e99..b03a9f907 100644 --- a/v3/src/components/Animation.js +++ b/v3/src/components/Animation.js @@ -85,6 +85,7 @@ var Animation = new Class({ delay: Components.Delay, delayedPlay: Components.DelayedPlay, + getCurrentKey: Components.GetCurrentKey, load: Components.Load, pause: Components.Pause, paused: Components.Paused, diff --git a/v3/src/components/animation/GetCurrentKey.js b/v3/src/components/animation/GetCurrentKey.js new file mode 100644 index 000000000..9774120fc --- /dev/null +++ b/v3/src/components/animation/GetCurrentKey.js @@ -0,0 +1,9 @@ +var GetCurrentKey = function () +{ + if (this.currentAnim) + { + return this.currentAnim.key; + } +}; + +module.exports = GetCurrentKey; diff --git a/v3/src/components/animation/index.js b/v3/src/components/animation/index.js index 25ea0f7c8..7202f3af0 100644 --- a/v3/src/components/animation/index.js +++ b/v3/src/components/animation/index.js @@ -6,6 +6,7 @@ module.exports = { Delay: require('./Delay'), DelayedPlay: require('./DelayedPlay'), + GetCurrentKey: require('./GetCurrentKey'), Load: require('./Load'), Pause: require('./Pause'), Paused: require('./Paused'),