vx.Camera

From vx
Revision as of 16:24, 18 December 2008 by 24.57.170.150 (Talk)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Contents

[edit] vx.Camera

A singleton object that handles all the camera interaction

[edit] Notes

As this is an internal object, you cannot create your own Camera object. This simply represents the type of a variable in the vx library. Just use the variable vx.camera to use this.

[edit] Attributes

vx.Camera.x -> number (read/write)
vx.Camera.y -> number (read/write)

  • The current position of the camera.

vx.Camera.target -> number (read/write)

  • The camera targeting mode:
    • vx.Camera.TARGET_NOTHING - full script control of the camera
    • vx.Camera.TARGET_PLAYER - camera follows the player
    • vx.Camera.TARGET_ENTITY - camera follows an entity

vx.Camera.entity -> number (read/write)

  • The entity being followed, if the targeting mode is vx.Camera.TARGET_ENTITY.

[edit] Methods

vx.Camera:TargetNothing()

  • Makes the camera target nothing, allowing full script control of the camera.

vx.Camera:TargetPlayer()

  • Makes the camera target the player and follow it around

vx.Camera:TargetEntity(entity)

  • Makes the camera target an entity and follow it around
Personal tools