author | truelight |
Tue, 13 Mar 2007 22:39:41 +0000 | |
branch | noai |
changeset 9366 | d30036300fe7 |
parent 9365 | c3d08e0b1083 |
child 9373 | d03563181088 |
permissions | -rw-r--r-- |
9366
d30036300fe7
(svn r9153) [NoAI] -Add: added a bit more code to the script to show how classes work (and that instances stay alive)
truelight
parents:
9365
diff
changeset
|
1 |
class SQNoAI { |
d30036300fe7
(svn r9153) [NoAI] -Add: added a bit more code to the script to show how classes work (and that instances stay alive)
truelight
parents:
9365
diff
changeset
|
2 |
tick = 0; |
d30036300fe7
(svn r9153) [NoAI] -Add: added a bit more code to the script to show how classes work (and that instances stay alive)
truelight
parents:
9365
diff
changeset
|
3 |
function GameLoop(); |
d30036300fe7
(svn r9153) [NoAI] -Add: added a bit more code to the script to show how classes work (and that instances stay alive)
truelight
parents:
9365
diff
changeset
|
4 |
} |
d30036300fe7
(svn r9153) [NoAI] -Add: added a bit more code to the script to show how classes work (and that instances stay alive)
truelight
parents:
9365
diff
changeset
|
5 |
|
d30036300fe7
(svn r9153) [NoAI] -Add: added a bit more code to the script to show how classes work (and that instances stay alive)
truelight
parents:
9365
diff
changeset
|
6 |
function SQNoAI::GameLoop() |
9365
c3d08e0b1083
(svn r9151) [NoAI] -Add: added squirrel module that loads squirrel scripts and
truelight
parents:
diff
changeset
|
7 |
{ |
9366
d30036300fe7
(svn r9153) [NoAI] -Add: added a bit more code to the script to show how classes work (and that instances stay alive)
truelight
parents:
9365
diff
changeset
|
8 |
print("GameLoop " + this.tick); |
d30036300fe7
(svn r9153) [NoAI] -Add: added a bit more code to the script to show how classes work (and that instances stay alive)
truelight
parents:
9365
diff
changeset
|
9 |
this.tick++; |
d30036300fe7
(svn r9153) [NoAI] -Add: added a bit more code to the script to show how classes work (and that instances stay alive)
truelight
parents:
9365
diff
changeset
|
10 |
} |
d30036300fe7
(svn r9153) [NoAI] -Add: added a bit more code to the script to show how classes work (and that instances stay alive)
truelight
parents:
9365
diff
changeset
|
11 |
|
d30036300fe7
(svn r9153) [NoAI] -Add: added a bit more code to the script to show how classes work (and that instances stay alive)
truelight
parents:
9365
diff
changeset
|
12 |
ai <- SQNoAI(); |
d30036300fe7
(svn r9153) [NoAI] -Add: added a bit more code to the script to show how classes work (and that instances stay alive)
truelight
parents:
9365
diff
changeset
|
13 |
|
d30036300fe7
(svn r9153) [NoAI] -Add: added a bit more code to the script to show how classes work (and that instances stay alive)
truelight
parents:
9365
diff
changeset
|
14 |
function GameLoop() |
d30036300fe7
(svn r9153) [NoAI] -Add: added a bit more code to the script to show how classes work (and that instances stay alive)
truelight
parents:
9365
diff
changeset
|
15 |
{ |
d30036300fe7
(svn r9153) [NoAI] -Add: added a bit more code to the script to show how classes work (and that instances stay alive)
truelight
parents:
9365
diff
changeset
|
16 |
ai.GameLoop(); |
9365
c3d08e0b1083
(svn r9151) [NoAI] -Add: added squirrel module that loads squirrel scripts and
truelight
parents:
diff
changeset
|
17 |
} |
c3d08e0b1083
(svn r9151) [NoAI] -Add: added squirrel module that loads squirrel scripts and
truelight
parents:
diff
changeset
|
18 |
|
c3d08e0b1083
(svn r9151) [NoAI] -Add: added squirrel module that loads squirrel scripts and
truelight
parents:
diff
changeset
|
19 |
print("Called init"); |