Exemplo n.º 1
0
        public static void UpdateAccelerationAndVelocity(ReactionControl rcs, Vector3 newPosition, Seconds elapsed)
        {
            var newVelocity = (newPosition - rcs.LastPosition) / elapsed;

            rcs.Acceleration = (newVelocity - rcs.Velocity) / elapsed;

            rcs.Velocity     = newVelocity;
            rcs.LastPosition = newPosition;
        }
Exemplo n.º 2
0
        private void buttonReaction_Click(object sender, EventArgs e)
        {
            if (buttonReaction.Checked)
            {
                this.sideBarPanel.Controls.Clear();
                this._contentPanel.Controls.Clear();

                ReactionControl reactControl = new ReactionControl();
                this.sideBarPanel.Controls.Add(reactControl);
                currentPanelContent = reactControl;
            }
        }
Exemplo n.º 3
0
 private void buttonReaction_Click(object sender, EventArgs e)
 {
     if (buttonReaction.Checked)
     {
         // removing second side bar from view, if there is one, and removing its context too
         if (sideBarPanel.Controls.Count > 0)
         {
             sideBarPanel.Controls.Remove(currentPanelContent);
             contentPanel.Controls.Clear();
         }
         ReactionControl reactControl = new ReactionControl();
         this.sideBarPanel.Controls.Add(reactControl);
         currentPanelContent = reactControl;
     }
 }