public BipedControllerComponent(Actor owner)
     : base(owner)
 {
     DesiredMovementActions = MovementActions.Neutral;
     OrientationChange = Quaternion.Identity;
     HorizontalMovement = Vector2.Zero;
     Controller = null;
     MaxTurnAnglePerTick = MathHelper.Pi / 8.0f;
     mAnimationStateMachine = null;
     mState = ControllerState.Neutral;
     mBooster = null;
     AimCheck = delegate() { return false; };
     mAttentionLock = new Object();
     IsAttentionAvailable = true;
     Owner.ActorInitialized += ActorInitializedHandler;
     WorldAim = null;
 }
 protected override void CreateAnimationPlayer(AnimationPackage animationPackage)
 {
     AnimationStateMachine = new AnimationStateMachine(animationPackage);
     GameResources.ActorManager.AnimationUpdateStep += AnimationUpdateHandler;
 }
        private void ActorInitializedHandler(object sender, EventArgs e)
        {
            StatefulAnimationComponent animationComponent = Owner.GetComponent<StatefulAnimationComponent>(ComponentType.Animation);
            if (animationComponent != null)
                mAnimationStateMachine = animationComponent.AnimationStateMachine;

            mBooster = Owner.GetBehavior<Booster>();
        }
 public override void Release()
 {
     mAnimationStateMachine = null;
     GameResources.ActorManager.PreAnimationUpdateStep -= PreAnimationUpdateHandler;
     GameResources.ActorManager.PostAnimationUpdateStep -= PostAnimationUpdateHandler;
 }