change class instantiation implementation
This commit is contained in:
parent
5598431951
commit
98544e5e8a
|
@ -109,7 +109,7 @@ function Animation.new(animPath, params)
|
|||
if (params.alpha ~= nil) then instance.alpha = params.alpha; end
|
||||
if (params.stroke ~= nil) then instance.stroke = params.stroke; end
|
||||
|
||||
return Base(Animation, instance);
|
||||
return CreateInstance(Animation, instance);
|
||||
end
|
||||
|
||||
---Create an AnimationState to play this animation.
|
||||
|
@ -119,7 +119,7 @@ end
|
|||
function Animation:createState(callback)
|
||||
---@type AnimationState
|
||||
local state = { animation = self, callback = callback, frameIndex = 1, timer = 0, running = false };
|
||||
return Base(AnimationState, state);
|
||||
return CreateInstance(AnimationState, state);
|
||||
end
|
||||
|
||||
---Create an AnimationState to play this animation and start it.
|
||||
|
|
|
@ -58,7 +58,7 @@ function Image.new(imagePath, noFallback)
|
|||
height = height,
|
||||
};
|
||||
|
||||
return Base(Image, instance);
|
||||
return CreateInstance(Image, instance);
|
||||
end
|
||||
|
||||
---Set the width and height of this Image.
|
||||
|
|
Loading…
Reference in New Issue