Exemple #1
0
 protected virtual void OnZoomChanged(OrientPosEventArgs e)
 {
     if (ZoomChanged != null)
     {
         ZoomChanged(this, e);
     }
 }
Exemple #2
0
 protected virtual void OnPositionChanged(OrientPosEventArgs e)
 {
     if (PositionChanged != null)
     {
         PositionChanged(this, e);
     }
 }
Exemple #3
0
        public void ZoomChanged(object sender, OrientPosEventArgs e)
        {
            if (e.Pitch == 0)
            {
                lastFovy = e.Pitch;
            }

            float sensitivity = 0.2f;

            float angle   = e.Pitch - lastFovy;
            float tmpFovy = fovy + angle * sensitivity;

            if (tmpFovy > 1 && tmpFovy < 179)
            {
                fovy = tmpFovy;
                _scene.UpdateFovy(tmpFovy);
            }
            lastFovy = e.Pitch;
        }
Exemple #4
0
 public void PositionChanged(object sender, OrientPosEventArgs e)
 {
     _gameObject.Transform.Translate(e.Pitch, e.Roll);
 }