summaryrefslogtreecommitdiff
path: root/samples/Hello/scripts/components/fireball.lua
diff options
context:
space:
mode:
Diffstat (limited to 'samples/Hello/scripts/components/fireball.lua')
-rw-r--r--samples/Hello/scripts/components/fireball.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/samples/Hello/scripts/components/fireball.lua b/samples/Hello/scripts/components/fireball.lua
new file mode 100644
index 0000000..8b31228
--- /dev/null
+++ b/samples/Hello/scripts/components/fireball.lua
@@ -0,0 +1,28 @@
+--ӳcomponent
+--lua require룬package.load
+local Spark = require("scripts/spark.lua")
+local Fireball = AsuraEngine.Component.Extend("Fireball")
+-- µķǺ֣ͣʾڱ༭УҪʾڱ༭Уһʼֵ
+-- жͣnilҪʾڱ༭
+Fireball.name = ""
+Fireball.position = 1
+Fireball.image = nil
+Fireball.spark = Spark.New()
+
+function Fireball:OnEnable()
+ self.image = self.gameobject.GetComponent(AsuraEngine.Image)
+end
+
+function Fireball:OnEvent(e)
+
+end
+
+function Fireball:OnUpdate(ms)
+
+end
+
+function Fireball:OnDraw()
+
+end
+
+return Fireball \ No newline at end of file