local this = {}

function this:setMainControlEntity(entity, setType)
  setType = setType or L_Const.setControlType.normal
  self.playerUnit:setMainControlEntity(entity, setType)
end

function this:fireJump()
  C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainJump, true)
  Timer.once(0.1, function()
    C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainJump, false)
  end, self)
end

function this:fireEvade()
  C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainEvade, true)
end

function this:fireAttack()
  C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainAttack, true)
end

function this:fireAttackDown()
  C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainAttack, true)
end

function this:fireAttackUp()
  C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainAttack, false)
end

function this:firePetCatch()
  C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainPetCatch, true)
end

function this:firePetHideShow()
  C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainHideShowPet, true)
end

function this:fireStartCatch()
  C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainPetStartCatch, true)
end

function this:fireUltimateSkill()
  C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainUltimateSkill, true)
end

function this:fireSkill()
  C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainSkill, true)
end

function this:firePetSkill()
  C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainPetSkill, true)
end

function this:firePetBreakSkill()
  C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainPetBreakSkill, true)
end

function this:fireFlyUp(press)
  C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainFlyUp, press)
end

function this:fireFlyFall(press)
  C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainFlyFall, press)
end

function this:fireFlySprint()
  C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainFlySprint)
end

function this:fireCountermeasuresSkill()
  C_InputManager.OnUITriggerKey(C_InputManager_KeyType.EMainCountermeasures, true)
end

return this
