---
--- Generated by MLN Team (https://www.immomo.com)
--- Created by MLN Team.
--- DateTime: 15-01-2020 17:35
---

---
---  动画定时执行器, 用来高度自定义动画
---
---
---  动画定时执行器, 会根据当前动画时长的百分比和屏幕的刷新频率来回调onAnimationUpdateCallback，以方便控制视图的动画状态
---
---@class Animator @parent class
---@public field name string 
---@type Animator
local _class = {
	_priveta_class_name = "Animator"}

---
---  无参构造方法
---
---@return Animator 
function Animator()
	return _class
end

---
---  设置动画重复方式以及次数
---
---@param repeatType RepeatType  重复模式，参考[RepeatType](RepeatType)，默认不重复
---@param repeatCount number  重复次数，默认不重复（0)，小于零时为无限次
---@return Animator 
function _class:setRepeat(repeatType, repeatCount)
	return self
end

---
---  设置动画时长
---
---@param duration number  动画时长，单位为s，不可为负数
---@return Animator 
function _class:setDuration(duration)
	return self
end

---
---  设置动画延时
---
---@param delay number  动画延时，单位为s，不可为负数
---@return Animator 
function _class:setDelay(delay)
	return self
end

---
---  开始动画
---
---@return Animator 
---@note  不可以重复调用
function _class:start()
	return self
end

---
---  取消动画
---
---@return Animator 
function _class:cancel()
	return self
end

---
---  结束动画
---
---@return Animator 
function _class:stop()
	return self
end

---
---  是否正在动画
---
---@return boolean 是否正在动画
function _class:isRunning()
	return true
end

---
---  设置动画开始回调
---
---@param startCallback fun():void
---	 动画开始回调,格式为：
---		```
---		function()
---			--- do something
---		end
---		```
---		
---@return Animator 
function _class:setStartCallback(startCallback)
	return self
end

---
---  设置动画结束回调
---
---@param endCallback fun():void
---	 动画结束回调,格式为：
---		```
---		function()
---			--- do something
---		end 
---		 ```
---		
---@return Animator 
function _class:setEndCallback(endCallback)
	return self
end

---
---  设置动画结束回调
---
---@param stopCallback fun():void
---	 动画结束回调,格式为：
---		```
---		function()
---			--- do something
---		end
---		```
---		
---@return Animator 
function _class:setStopCallback(stopCallback)
	return self
end

---
---  设置动画重复回调
---
---@param repeatCallback fun():void
---	 动画重复时回调,格式为：
---		```
---		function()
---			--- do something
---		end
---		```
---		
---@return Animator 
function _class:setRepeatCallback(repeatCallback)
	return self
end

---
---  设置动画取消的回调
---
---@param cancelCallback fun():void
---	 动画取消的回调,格式为：
---		```
---		function()
---			--- do something
---		end
---		```
---		
---@return Animator 
function _class:setCancelCallback(cancelCallback)
	return self
end

---
---  设置动画更新的回调
---
---@param updateCallback fun(precentage:number):void
---	 动画更新的回调,格式为：
---		```
---		function(number percentage)
---			--- percentage 当前占动画总执行时长的百分比
---		end
---		```
---		
---@return Animator 
function _class:setOnAnimationUpdateCallback(updateCallback)
	return self
end

---
---  克隆动画执行器
---
---@return Animator 
function _class:clone()
	return self
end

return _class