コード例 #1
0
 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;
 }
コード例 #2
0
        private void ActorInitializedHandler(object sender, EventArgs e)
        {
            StatefulAnimationComponent animationComponent = Owner.GetComponent<StatefulAnimationComponent>(ComponentType.Animation);
            if (animationComponent != null)
                mAnimationStateMachine = animationComponent.AnimationStateMachine;

            mBooster = Owner.GetBehavior<Booster>();
        }