예제 #1
0
 internal MouseUpEvent(InputManager.MouseKey k, Vector2 pos)
 {
     this.k = k;
     this.pos = pos;
 }
예제 #2
0
 private void mousedonw(InputManager.MouseKey k, Vector2 position)
 {
     if (!Destroyed && Alive && !Attacking && k == InputManager.MouseKey.LeftKey)
     {
         Attacking = true;
         Rotation = new Vector3(0, World.GetInstance().ActiveCam.Rotation.Y + (float)Math.PI, 0);
         Model = FireModel;
         StartAnimation(DefaultClip, false);
         dgthrown = false;
     }
 }
예제 #3
0
 private static void mdown(InputManager.MouseKey k, Vector2 position)
 {
     HandleEvent(new MouseDownEvent(k, position));
 }
예제 #4
0
 private static void mup(InputManager.MouseKey k, Vector2 pos)
 {
     HandleEvent(new MouseUpEvent(k, pos));
 }
예제 #5
0
 internal override void HandleEvent(WorldEvent e)
 {
     if (!visible)
     {
         return;
     }
     base.HandleEvent(e);
     if (e.Handled)
     {
         return;
     }
     if (!selected)
     {
         return;
     }
     if (e is KeyDownEvent)
     {
         Keys k = (e as KeyDownEvent).Key;
         if (k == Keys.Back || k == Keys.Delete)
         {
             Input((char)8);
         }
         else if (CommonData.KeyCharMap.Keys.Contains(k))
         {
             Input(CommonData.KeyCharMap[k][InputManager.IsKeyDown(Keys.LeftShift) || InputManager.IsKeyDown(Keys.RightShift) ? 1 : 0]);
         }
     }
 }