Exemplo n.º 1
0
 public CharacterObservation MoveAndRotate(PlainVec3D movement, PlainVec2F rotation3, float roll = 0, int ticks = 1)
 {
     return(Enqueue(() =>
     {
         m_character.MoveAndRotate(movement, rotation3, roll, ticks);
         return m_observer.Observe();
     }));
 }
Exemplo n.º 2
0
        public CharacterObservation MoveAndRotate(PlainVec3D movement, PlainVec2F rotation3, float roll, int ticks)
        {
            var vector3d = movement.ToVector3D();

            if (vector3d == Vector3D.Down && Character.CurrentMovementState == MyCharacterMovementEnum.Standing && !Character.JetpackRunning)
            {
                Character.Crouch();
            }
            else if (vector3d == Vector3D.Up && Character.CurrentMovementState == MyCharacterMovementEnum.Crouching && !Character.JetpackRunning)
            {
                Character.Stand();
            }

            IvxrPlugin.Context.ContinuousMovementController.ChangeMovement(
                new ContinuousMovementContext()
            {
                MoveVector = movement, RotationVector = rotation3, Roll = roll, TicksLeft = ticks
            }
                );

            return(m_observer.Observe());
        }
 CharacterObservation MoveAndRotate(PlainVec3D movement, PlainVec2F rotation3, float roll = 0, int ticks = 1)
 {
     return(m_se.Character.MoveAndRotate(movement, rotation3, roll, ticks));
 }
Exemplo n.º 4
0
 public void Reset()
 {
     TicksLeft      = 0;
     MoveVector     = PlainVec3DConst.Zero;
     RotationVector = PlainVec2FConst.Zero;
 }
Exemplo n.º 5
0
 public static Vector2 ToVector2(this PlainVec2F vector)
 {
     return(new Vector2(vector.X, vector.Y));
 }
Exemplo n.º 6
0
 public CharacterObservation MoveAndRotate(PlainVec3D movement, PlainVec2F rotation3, float roll, int ticks)
 {
     throw new NotImplementedException();
 }