Variables

From vx
Jump to: navigation, search

Hey you! If you notice any undocumented parts of vx, please let me know! That, or put the changes in and tell me about it.

[edit] Variables contained by the vx namespace

vx.map -> (internal class) vx.Map

  • The object that handles all map interaction.

vx.camera -> (internal class) vx.Camera

  • The object that handles all camera manipulation.

vx.clock -> (internal class) vx.Clock

  • The object that takes care of timing.

vx.music -> (internal class) vx.Music

  • The object that deals with the "simple" music system.

vx.default_font -> vx.Font

  • A font object wrapping the builtin default verge font handle.

vx.screen -> vx.Image

  • An image object wrapping the screen handle.

vx.mouse -> (internal class) vx.MouseInput

  • The object representing the mouse.
  • It has the following attributes:
    • vx.mouse.x -> number
    • vx.mouse.y -> number
      • The location of the mouse
    • vx.mouse.wheel -> number
      • A number refering to the mouse wheel location
    • vx.mouse.left -> (internal class) vx.Button
    • vx.mouse.middle -> (internal class) vx.Button
    • vx.mouse.right -> (internal class) vx.Button
      • The left, middle and right buttons of the mouse.

vx.key["KeyName"] -> (internal class) vx.Button
vx.key.KeyName -> (internal class) vx.Button

  • An array of all the keyboard keys. The numeric keyboard keys need to be referenced with the array [] table notation, but everything else can be referenced using the dot . table notation.
  • Here are the valid scancode names: Escape 1 2 3 4 5 6 7 8 9 0 Minus Equals Backspace Tab Q W E R T Y U I O P LeftAangle RightAngle Enter Ctrl A S D F G H J K L Semicolon Apostrophe Grave LeftShift Backslash Z X C V B N M Comma Dot Slash RightShift Star Alt Space CapsLock F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 NumLock ScrollLock NumpadHome Up NumpadPageUp NumpadMinus Left Numpad5 Right NumpadPlus NumpadEnd Down NumpadPageDown NumpadInsert NumpadDelete F11 F12 Insert Delete Home End PageUp PageDown

vx.joystick -> (internal class) vx.JoystickInput

  • The object representing the mouse.
  • It has the following attributes:
    • vx.joystick.joy_index -> number
      • The currently monitored joystick index. A number between 0-7, I think? You don't normally have to mess with this.
    • vx.joystick.active -> number
      • Whether or not the joystick at this slot is being used.
    • vx.mouse.analog_x -> number
    • vx.mouse.analog_y -> number
      • The location of the analog.
    • vx.mouse.up -> boolean
    • vx.mouse.down -> boolean
    • vx.mouse.left -> boolean
    • vx.mouse.right -> boolean
      • Whether a given directional on the joystick is being used.
    • vx.mouse.button[b] -> (internal class) vx.Button
      • The button for the given joystick. Is in the range 0-31. Not all of these buttons will do something, depending on the joystick.
    • vx.mouse.right -> (internal class) vx.Button
      • The left, middle and right buttons of the mouse.
Personal tools