Exemplo n.º 1
0
        internal override void Copy(PhysicsBodyState state)
        {
            base.Copy(state);

            var playerState = (PlayerState)state;

            Animation                  = playerState.Animation;
            Physics                    = playerState.Physics;
            ScopeAngle                 = playerState.ScopeAngle;
            IsGrounded                 = playerState.IsGrounded;
            IsClingedWall              = playerState.IsClingedWall;
            InputJumpedStep            = playerState.InputJumpedStep;
            JumpedStep                 = playerState.JumpedStep;
            LandedStep                 = playerState.LandedStep;
            HorizontalCorrectionStep   = playerState.HorizontalCorrectionStep;
            HittedStep                 = playerState.HittedStep;
            LastFallingVelocityYFactor = playerState.LastFallingVelocityYFactor;
            LandingVelocityYFactor     = playerState.LandingVelocityYFactor;
            IsDead = playerState.IsDead;
        }
Exemplo n.º 2
0
 internal static void Lerp(float progress, PhysicsBodyState from, PhysicsBodyState to, PhysicsBodyState progressState)
 {
     progressState.Position       = Mathf.Lerp(progress, from.Position, to.Position);
     progressState.LinearVelocity = Mathf.Lerp(progress, from.LinearVelocity, to.LinearVelocity);
 }
Exemplo n.º 3
0
 internal virtual void Copy(PhysicsBodyState state)
 {
     BodyCache.Clone(state.BodyCache);
     Position       = BodyCache.Position;
     LinearVelocity = BodyCache.LinearVelocity;
 }