-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------

function onRunning(speed)
	if speed>0.5 then
		playAnimation("walk", 0.2, Humanoid)
		pose = "Walking"
	elseif speed<0.5 then
		playAnimation("idle", 0.2, Humanoid)
		pose = "Standing"
	end
end
function onDied()
	pose = "Dead"
end
function onGettingUp()
	pose = "GettingUp"
end
function onFallingDown()
	pose = "FallingDown"
end
function onPlatformStanding()
	pose = "PlatformStanding"
end
local lastTick = 0
function stepAnimate(currentTime)
	local amplitude = 1
	local frequency = 1
  	local deltaTime = currentTime - lastTick
  	lastTick = currentTime
	if (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
		stopAllAnimations()
		amplitude = 0.1
		frequency = 1
	end
end