blob: b498a36bd3924ac7ef1f1957df420e432ec27165 (
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
|
local Component = AsuraEngine.Class("Component")
AsuraEngine.Component = Component
--Component.gameobject = AsuraEngine.Type.GameObject
--派生新的组件
function Component.Sub(cname)
assert(Component.components[cname] == nil)
end
function Component:Ctor(go)
self.gameobject = go
end
function Component:OnEvent(e)
end
function Component:OnUpdate(ms)
end
function Component:OnDraw()
end
return Component
|