blob: fd2f979850c6896e50bd29ff18d80f645c09f35d (
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
31
32
33
|
local Component = AsuraEngine.Framework.Require("component")
AsuraEngine.Animator = Component.Extend("Animator")
local Animator = AsuraEngine.Animator
-- Animator inspector variables.
Animator.spriteRenderer = AsuraEngine.Type.SpriteRenderer
Animator.animation = AsuraEngine.Type.Animation
function Animator:Ctor(entity, animation)
self.base(entity)
self.spriteRenderer = entity:GetSpriteRenderer()
self.animation = animation
end
function Animator:SetAnimation(animation)
self.animation = animation
end
function Animator:GetAnimation()
return self.animation
end
function Animator:OnUpdate(dt)
end
function Animator:OnRender()
end
return Animator
|