require 'Scripts/Tutorials/TutorialFingerUtil.lua'
require 'Scripts/Tutorials/TutorialControllerUtil.lua'

tutorialStep = UITutorialStep:create(false)
tutorialStep:addCompletionEvent(GameEventType_NextBattlezone)
tutorialStep:addCompletionEvent(GameEventType_LevelEnd)

inputType = BAMFGame:sharedGame():getInputType()

coachPanel = CoachPanel:create(appendTutorialKeyInputType("TutorialThrow2", inputType), true)
coachPanel:show(0)
tutorialStep:addChild(coachPanel, ZOrder_Behind)

if inputType == InputType_Touchscreen then
    oneFingerSwipeDown(tutorialStep)
elseif inputType == InputType_Keyboard then
    engageKeyboardTutorial(tutorialStep, getButtonSpritePathIdle(inputType, "L"), getButtonSpritePathEngaged(inputType, "L"))
else
    engageControllerTutorial(tutorialStep, getButtonSpritePathIdle(inputType, "3"), getButtonSpritePathEngaged(inputType, "3"))
end

Level:getCurrentLevel():getHUD():addChild(tutorialStep)

coroutine.yield(tutorialStep)