Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2011-06-01 11:42:40 +0400
committerMitchell Stokes <mogurijin@gmail.com>2011-06-01 11:42:40 +0400
commit39bbf3854a5c91e3d8e410d01b34d4e88df20879 (patch)
tree63b5a746bb780fe54eb398f764ce90eed5f3cf7f /source/gameengine/Ketsji/BL_ActionManager.cpp
parent6394261e54215d50b1e39e8ea45dcb63080f193e (diff)
BGE Animations: Reimplemented the continuous function of the action actuator.
* To do this, I've added Get/SetFrame() functions. * I've also cleaned up a little bit of the wrap around logic in BL_Action.cpp.
Diffstat (limited to 'source/gameengine/Ketsji/BL_ActionManager.cpp')
-rw-r--r--source/gameengine/Ketsji/BL_ActionManager.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/BL_ActionManager.cpp b/source/gameengine/Ketsji/BL_ActionManager.cpp
index ddbf287e501..2570cc1f140 100644
--- a/source/gameengine/Ketsji/BL_ActionManager.cpp
+++ b/source/gameengine/Ketsji/BL_ActionManager.cpp
@@ -42,6 +42,20 @@ BL_ActionManager::~BL_ActionManager()
StopAction(i);
}
+float BL_ActionManager::GetActionFrame(short layer)
+{
+ if (m_layers[layer])
+ return m_layers[layer]->GetFrame();
+
+ return 0.f;
+}
+
+void BL_ActionManager::SetActionFrame(short layer, float frame)
+{
+ if (m_layers[layer])
+ m_layers[layer]->SetFrame(frame);
+}
+
void BL_ActionManager::PlayAction(class KX_GameObject* gameobj,
const char* name,
float start,