예제 #1
0
        protected override void Update(double deltaTime)
        {
            base.Update(deltaTime);

            if (Input.IsKeyPressed(OpenTK.Input.Key.I))
            {
                rigidBody.ApplyImpulse(Vector3.UnitY * rand.Next(30, 100));
            }
            if (Input.IsKeyPressed(OpenTK.Input.Key.T))
            {
                rigidBody.ApplyTorqueImpulse(Vector3.UnitY * rand.Next(10, 50));
            }
        }
예제 #2
0
 public override void _Input(InputEvent @event)
 {
     if (@event is InputEventScreenTouch ld && ld.Pressed && ld.Position.x < GetViewport().GetVisibleRect().Size.x / 2)
     {
         flipperL.ApplyTorqueImpulse(new Vector3(IMPULSE, 0, 0));
     }