Reader small image

You're reading from  Corona SDK Mobile Game Development: Beginner's Guide

Product typeBook
Published inMar 2015
Publisher
ISBN-139781783559343
Edition1st Edition
Tools
Right arrow
Author (1)
Michelle M Fernandez
Michelle M Fernandez
Right arrow

Objects


Tables and functions are objects; variables do not actually contain these values, only references to them. Tables are also used in what is known as object-oriented programming. Variables and methods that manipulate those variables can be collected together into objects. Such a value is called an object, and its functions are called methods. In Corona, we'll focus more on display objects since they are essential for game development.

Display objects

Anything drawn on the screen is made by display objects. In Corona, the assets you see displayed in the simulator are instances of display objects. You have probably seen shapes, images, and text, which are all forms of display objects. When you create these objects, you'll be able to animate them, turn them into backgrounds, interact with them using touch events, and so on.

Display objects are created by calling a function known as a factory function. There is a specific kind of factory function for each type of display object. For example...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Corona SDK Mobile Game Development: Beginner's Guide
Published in: Mar 2015Publisher: ISBN-13: 9781783559343

Author (1)