repo.or.cz
/
luagame.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
First commit of LuaGame with an OpenGL backend.
[luagame.git]
/
base
/
Rect.lua
blob
5da6a14b18cf6817ad3030b760ac5ba18eaffebf
1
--Rect object (used for collision detection)
2
3
Rect
= {}
4
Rect
.
x
=
0
5
Rect
.
y
=
0
6
Rect
.
w
=
0
7
Rect
.
h
=
0
8
Rect
.
id
=
""
--string returned from collision tests
9
10
11
--creates a new rect
12
function
Rect
:
new
(
o
)
13
o
=
o
or
{}
14
setmetatable
(
o
,
self
)
15
self
.
__index
=
self
16
return
o
17
end