2
나는 여기에서 약간의 도움이 필요하다. .. 잘, 나는 나의 게임에서 긴 레벨을 만들고있다. 내 레벨 해상도는 1280 x 960 (높이 x 2)이고 문제는 카메라가 객체를 따라갈 때 640 x 960 영역에서만 선을 그릴 수 있고 선을 그릴지라도 640 x 960 영역에서 선을 그립니다. 어딘가에 1100 높이 영역에서 ... 나는 그것을 알아낼 수 없다 ... 라인과 카메라는 코로나 워드 프로세서에서와 moveCamera는 EggBreaker 예제에서 ... 감사합니다! 당신은 당신이 transition.cancel(null)
를 호출(코로나 SDK) 그려지는 영역
fileTwo:stop();
전화, 그것이 null 원인 이상한 행동이 함수를 호출하는 것
W = display.contentWidth;
H = display.contentHeight;
local function createPlatform(event)
if (event.phase == "began") then
if(line) then
line.parent:remove(line);
end
x = (event.x - (W/2 - 80));
y = (event.y - (H/2));
line = display.newLine(W/2 - 80, H/2, event.x, event.y)
line.width = 5;
physics.addBody(line, "static", {shape = {0, 0, x, y}});
line.isBullet = true;
end
if (event.phase == "moved") then
x = (event.x - (W/2 - 80));
y = (event.y - (H/2));
if (line) then
line.parent:remove(line);
end
line = display.newLine(W/2 - 80, H/2, event.x, event.y)
line.width = 5;
physics.addBody(line, "static", {shape = {0, 0, x, y}});
line.isBullet = true;
end
if (event.phase == "ended") then
end
end
Runtime:addEventListener("touch", createPlatform)
--Camera follows bolder automatically
local function moveCamera()
if (obj.x > 320 and obj.x < 960) then
gameGroup.x = -obj.x + 320
end
end
Runtime:addEventListener("enterFrame", moveCamera)