Skip to content

Latest commit

 

History

History
72 lines (45 loc) · 1.36 KB

README.mdown

File metadata and controls

72 lines (45 loc) · 1.36 KB

Readme

For Lua and CoronaSDK

Author: Adam Buchweitz (email)

Version 0.1

Written and supported by Adam Buchweitz and Crawl Space Games

http://crawlspacegames.com http://twitter.com/crawlspacegames

For inquiries about Crawl Space, email us at [email protected]

For support with this class, email me at [email protected]

Copyright (C) 2011 Crawl Space Games - All Rights Reserved


###:: FEATURES ::

The Camera is in very early stages of developement. It's something I threw together in a few hours because I needed a camera!


###:: USAGE ::

local camera = require "Camera" camera.init()

local myObject = display.newCircle(100, 100, 25) camera.track(myObject)

###:: EXAMPLE :: ####Add an object as a parallax background Valid background values are 0.1 through 0.9

local myObject = display.newCircle(100, 100, 25) camera.add(myObject, 0.5)

###:: EXAPMLE :: ####Add an object as a parallax foreground Valid foreground values are any negative number.

local myObject = display.newCircle(100, 100, 25) camera.add(myObject, -0.5)

###:: EXAPMLE :: ####Add an object to the background, locked to its horizontal axis You can also lock to vertical axis with "y"

local myObject = display.newCircle(100, 100, 25) camera.add(myObject, 0.5, "x")