Inherits from JavaScript Object

Overview

Console is designed to provide similiar features as the console object in browsers does.

Messages are output to the device console, which can be viewed by Xcode Debugger Console or Xcode Organizer. The line number and script file name can be found in the message, which could be useful to debug your games.

Below is an example message printed by console.log("Initializing...")

04/22/12,12:51:19 [tank1_test.js:82] LOG>> Initializing...

We can find out that the message is produced at line 82 in “tank1_test.js”.

Messages produced by console.warn(...) and console.error(...) are also visible as on-screen notifications if “Develop Mode” of OpenAphid is turned on.

Overview of Tasks

Functions

  • Return Type
  • void
  • void
  • void
  • void
  • void
  • void
  • void

Functions

assert(condition, message,...)

void assert(bool condition, object message,…)

Parameters

bool condition
object message

debug(message,...)

void debug(object message,…)

Parameters

object message

error(message,...)

void error(object message,…)

Parameters

object message

info(message,...)

void info(object message,…)

Parameters

object message

log(message,...)

void log(object message,…)

Parameters

object message

trace()

void trace()

warn(message,...)

void warn(object message,…)

Parameters

object message