blob: 0eb7fc15009f2e6861d2db911f71d01092aa7e52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
AsuraEngine.Component = AsuraEngine.Class("Component")
local Component = AsuraEngine.Component
-- Component要显示在inspector的变量
Component.gameobject = AsuraEngine.Type.GameObject
function Component.Sub(cname)
self.base(cname)
assert(Component.components[cname] == nil)
end
function Component:Ctor(gameobject)
self.gameobject = gameobject
end
function Component:OnEvent(e)
end
function Component:OnUpdate(ms)
end
function Component:OnDraw()
end
return Component
|