defining Class

C

Carl Forsman

In the following, is that ture

$package a fucntion??
$class a function??

the variable $class = a function will take some parameters ??

$extends : Gamelib.mobile
<variable $extends is an object of GameLib.mobile ??>

the :)) sign means
<is an object of ??>

months : $static (null);
<variable months is an object of $static(null) ??>

$static (null)
< this is a function with name $static ??>

<I had see people define function like this>
function launchNormal (params) {
// some code
}

<we can also define javascript function like this too??>
launchNormal : function(params) {
// some code
},

showGameScreen : $static(function( returnScreen ) {
// some code
}),
<showGameScreen is an object of the function $static, where the
function $static will take an anonymous function as parameter??>


====================================

$package("");

$class("Gamespot", {
$extends : GameLib.mobile,

months : $static( null ),

notifiedCounter : $static(0),

IMAGE_SIZE : $static( null ),

$constructor : function() {
this.$base();
// some code
},

launchNormal : function(params) {
// some code
},

showGameScreen : $static(function( returnScreen ) {
// some code
}),

noConnection : $static(function ( returnScreen ) {
// some code
}),

initialize : $static(function() {
// some code
}),
});

$package("");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,104
Latest member
LesliVqm09
Top