Skip to content
Browse files

added a setter on AnimatorComponent that can change animations by set…

…ting a property "currentAnimation" (cherry-picking from commit 770ede67729d16541baaf31ee19019501696c0e2)
  • Loading branch information...
1 parent c075694 commit cd1e3f444e0dd65b5453797eba98a0ceea9262c8 @hybridmindset committed Jul 27, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/com/pblabs/animation/AnimatorComponent.as
View
6 src/com/pblabs/animation/AnimatorComponent.as
@@ -10,6 +10,7 @@ package com.pblabs.animation
{
import com.pblabs.engine.components.AnimatedComponent;
import com.pblabs.engine.entity.PropertyReference;
+
import flash.utils.Dictionary;
/**
@@ -93,5 +94,10 @@ package com.pblabs.animation
play(defaultAnimation);
}
+
+ public function set currentAnimation(animationName : String):void
+ {
+ play(animationName);
+ }
}
}

0 comments on commit cd1e3f4

Please sign in to comment.
Something went wrong with that request. Please try again.