コード例 #1
0
 private async void ControllerPage_VelocityChanged(object sender, Velocity3D?value)
 {
     await Dispatcher.RunAsync(CoreDispatcherPriority.High, () =>
     {
         if (value != null)
         {
             AircraftVelocity = value.Value;
         }
     });
 }
コード例 #2
0
    public GroundState3D(Controller3D controller, Velocity3D velocity)
    {
        if (controller == null)
        {
            throw new ArgumentNullException("Controller");
        }
        if (velocity == null)
        {
            throw new ArgumentNullException("Velocity");
        }

        this.controller = controller;
        this.velocity   = velocity;
    }
コード例 #3
0
ファイル: AirState3D.cs プロジェクト: Rostad/ProjectE
    public AirState3D(Controller3D controller, Velocity3D velocity)
    {
        if (controller == null)
        {
            throw new ArgumentNullException("Controller");
        }
        if (velocity == null)
        {
            throw new ArgumentNullException("Velocity");
        }

        this.controller = controller;
        this.velocity   = velocity;
        jumpCount       = 0;
        jumpGracePeriod = 0.2f;
        timeEntered     = Time.time;
    }
コード例 #4
0
ファイル: DodgeState3D.cs プロジェクト: Rostad/ProjectE
    public DodgeState3D(Controller3D controller, Velocity3D velocity)
    {
        if (controller == null)
        {
            throw new ArgumentNullException("Controller");
        }
        if (velocity == null)
        {
            throw new ArgumentNullException("Velocity");
        }

        this.controller = controller;
        this.velocity   = velocity;
        direction       = new Vector3(PlayerInputs.instance.MovementInput.x, 0.0f, PlayerInputs.instance.MovementInput.y);
        direction.Normalize();
        timer    = 0.0f;
        duration = controller.DodgeDuration;
    }
コード例 #5
0
ファイル: DodgeState3D.cs プロジェクト: Rostad/IkSO
    public DodgeState3D(Controller3D controller, Velocity3D velocity)
    {
        if (controller == null)
        {
            throw new ArgumentNullException("Controller");
        }
        if (velocity == null)
        {
            throw new ArgumentNullException("Velocity");
        }

        this.controller = controller;
        this.velocity   = velocity;
        direction       = new Vector3(Input.GetAxisRaw("Horizontal"), 0.0f, Input.GetAxisRaw("Vertical"));
        direction.Normalize();
        timer    = 0.0f;
        duration = controller.DodgeDuration;
    }
コード例 #6
0
 public void ShareVelocity(Velocity3D velocity)
 {
     this.velocity = velocity;
 }
コード例 #7
0
 public Player()
 {
     _velocity         = new Velocity3D();
     _lookDirection    = new LookDirection2D();
     _verticalVelocity = 0.0f;
 }
コード例 #8
0
 private void CreateVelocity()
 {
     velocity = new Velocity3D(-TerminalVelocity);
 }
コード例 #9
0
 ///<exclude/>
 public bool Equals(Velocity3D other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return other._Vx.Equals(_Vx) && other._Vy.Equals(_Vy) && other._Vz.Equals(_Vz) && other._Vr.Equals(_Vr) && other._Vp.Equals(_Vp) && other._Va.Equals(_Va);
 }