コード例 #1
0
        /// <summary>
        /// Create a new player movement object for handling player motion
        /// </summary>
        public LevitationMovementController(LevitationHandlingDesc handlingDesc)
        {
            Position = Vector3.Zero;
            Velocity = Vector3.Zero;
            Force = Vector3.Zero;

            Rotation = Matrix.Identity;
            RotationVelocityAxis = Vector3.Zero;
            RotationForce = Vector3.Zero;

            handling = handlingDesc;
        }
コード例 #2
0
        /// <summary>
        /// Create a new player movement object for handling player motion
        /// </summary>
        public LevitationMovementController(LevitationHandlingDesc handlingDesc)
        {
            Position = Vector3.Zero;
            Velocity = Vector3.Zero;
            Force    = Vector3.Zero;

            Rotation             = Matrix.Identity;
            RotationVelocityAxis = Vector3.Zero;
            RotationForce        = Vector3.Zero;

            handling = handlingDesc;
        }
コード例 #3
0
        public override void Initialize(ContentManager contentLoader, ComponentManifest manifest)
        {
            base.Initialize(contentLoader, manifest);

            LevitationHandlingDesc levitationDesc = new LevitationHandlingDesc();
            levitationDesc.DampingForce = GameOptions.MovementForceDamping;
            levitationDesc.DampingRotationForce = GameOptions.MovementRotationForceDamping;
            levitationDesc.MaxRotationVelocity = GameOptions.MovementRotationVelocity;
            levitationDesc.MaxVelocity = GameOptions.MovementVelocity;

            mController = new LevitationMovementController(levitationDesc);
            GameResources.ActorManager.PreAnimationUpdateStep += PreAnimationUpdateHandler;
        }
コード例 #4
0
        public override void Initialize(ContentManager contentLoader, ComponentManifest manifest)
        {
            base.Initialize(contentLoader, manifest);

            LevitationHandlingDesc levitationDesc = new LevitationHandlingDesc();

            levitationDesc.DampingForce         = GameOptions.MovementForceDamping;
            levitationDesc.DampingRotationForce = GameOptions.MovementRotationForceDamping;
            levitationDesc.MaxRotationVelocity  = GameOptions.MovementRotationVelocity;
            levitationDesc.MaxVelocity          = GameOptions.MovementVelocity;

            mController = new LevitationMovementController(levitationDesc);
            GameResources.ActorManager.PreAnimationUpdateStep += PreAnimationUpdateHandler;
        }