Page 1 of 1
its very hard to understand ,why not 3,5 citcle,
Posted: Tue Feb 03, 2015 10:03 am
by sura
Code: Select all
--[[
猜古诗游戏
]]
--定义每一个五变形的点坐标位置
startx=300
starty=200
circlerad=25
circleseg=1000
bulletsite={}
--需要画出的一排最小的数量
minnum=3
function love.load()
end
function love.draw()
love.graphics.setBackgroundColor(213,213,200);--背景色
love.graphics.setColor(300, 100, 100);--前景色
--[[
love.graphics.circle("line", startx, starty, circlerad, circleseg);
love.graphics.circle("line", startx+50, starty, circlerad, circleseg);
love.graphics.circle("line", startx+100, starty, circlerad, circleseg);
love.graphics.circle("line", startx, starty+50, circlerad, circleseg);
love.graphics.circle("line", startx+50, starty+50, circlerad, circleseg);
]]
--循环打印出圈圈
for j=1,2 do
for i=1,minnum do
love.graphics.circle("line", startx+i*50, starty+(j-1)*50, circlerad, circleseg);
end
minnum=minnum+2
end
end
function love.update()
end
Re: its very hard to understand ,why not 3,5 citcle,
Posted: Tue Feb 03, 2015 10:53 am
by Doctory
what the actual *bleep*
Re: its very hard to understand ,why not 3,5 citcle,
Posted: Tue Feb 03, 2015 10:58 am
by Muris
I used google translator to try to understand chinese comments, so I might be wrong but...
I tried my best to understand the problem, and I think you are wondering why it draws endless amount of circles. The problem is that you do not reset the minnum, so it keeps growing every time draw is being called.
Code: Select all
--[[
猜古诗游戏
]]
--定义每一个五变形的点坐标位置
startx=300
starty=200
circlerad=25
circleseg=30
bulletsite={}
--需要画出的一排最小的数量
minnum=3
function love.load()
end
function love.draw()
love.graphics.setBackgroundColor(213,213,200);--背景色
love.graphics.setColor(300, 100, 100);--前景色
--[[
love.graphics.circle("line", startx, starty, circlerad, circleseg);
love.graphics.circle("line", startx+50, starty, circlerad, circleseg);
love.graphics.circle("line", startx+100, starty, circlerad, circleseg);
love.graphics.circle("line", startx, starty+50, circlerad, circleseg);
love.graphics.circle("line", startx+50, starty+50, circlerad, circleseg);
]]
--循环打印出圈圈
minnum = 3 -- otherwise this keeps growing on every draw call.
-- 1.st call: minnum = 3
-- 2nd call minnum = 5
-- 3rd call minnum = 7
-- 4th call minnum = 9 ...
for j=1,2 do
for i=1,minnum do
love.graphics.circle("line", startx+i*50, starty+(j-1)*50, circlerad, circleseg);
end
minnum=minnum+2
end
end
function love.update()
end
Re: its very hard to understand ,why not 3,5 citcle,
Posted: Thu Feb 05, 2015 2:11 am
by Alexar
it's really rare to see Chinese here, and i am a Chinese.
if u want some help, you can contact with QQ1643386616
~em i really dont follow your idea even i am a Chinese...