Beispiel #1
0
        private void C_KeyUp(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
            case Keys.ShiftKey:
                ShiftDown = false;
                break;

            case Keys.F2:
                MMessageBus.ChangeModeRequest(this, MAvatar.eMoveMode.Walking);
                break;

            case Keys.F3:
                MMessageBus.ChangeModeRequest(this, MAvatar.eMoveMode.Flying);
                break;

            case Keys.F4:
                MMessageBus.ToggleGravity(this);
                break;

            case Keys.F:
                MMessageBus.Focus(this, null);
                break;

            case Keys.Y:
                CreateTest();
                break;
            }
        }
Beispiel #2
0
 private void ModeButton_Click(object sender, EventArgs e)
 {
     if (Globals.Avatar.GetMoveMode() == MAvatar.eMoveMode.Flying)
     {
         MMessageBus.ChangeModeRequest(this, Massive.MAvatar.eMoveMode.Walking);
         MMessageBus.GravityStateChanged(this, new BooleanEvent(true));
     }
     else
     {
         MMessageBus.ChangeModeRequest(this, Massive.MAvatar.eMoveMode.Flying);
         MMessageBus.GravityStateChanged(this, new BooleanEvent(false));
     }
 }