나는 캐릭터가 많은 '플래 피 버드 "문자처럼 반사 게임을 개발하고 있어요.코로나 SDK, 플래 피 버드 바운스 효과
나는 잘 작동하지만, 나는 touch event
으로 튀는 효과를 건네고있다. 사용자 double touches
은 정말 빠르기 때문에 기본적으로 플레이어 뒤쪽에 doubles the force
이있다.
또한, 플레이어가 higher height
에서 dropping
경우 다음 gravity
너무 많은 것 같다 예를 들어 타고 나는 touch
에 다시 플레이어를 가져 오는 더 많은 시간을 가지고, 난 그냥 알아낼 수 없습니다 양 캐릭터 bounces
와 모든 touch
일관성을 유지하는 방법.
여기 바운스 효과를 내 기능입니다 :
function flyUp(event)
if event.phase == "began" then
if gameStarted == false then
player.bodyType = "dynamic"
instructions.alpha = 0
tb.alpha = 1
addColumnTimer = timer.performWithDelay(1000, addColumns, -1)
moveColumnTimer = timer.performWithDelay(2, moveColumns, -1)
gameStarted = true
player:applyForce(0, -300, player.x, player.y)
else
player:applyForce(0, -460, player.x, player.y)
end
end
end
... 그리고 여기 내 플레이어가 물리 본체로 정의된다 : 어떤 도움은 매우 극명하게 될 것이다
physics.addBody(player, "static",
{ density=.106, bounce=.1, friction=1, radius = 30 })
, 나는 플레이어가 얼마나 많은 도청을했는지 그리고 얼마나 많이 떨어졌는지에 상관없이 항상 같은 액수만큼 움직이기를 원합니다.
감사
감사합니다! 나는 단순히 setLinearVelocity에 applyForce을 변경하고 약간 아래로 중력을 설정 한 경우 다음 플레이어가 부동에 일관성이 있음을 알아 냈다. – siegs