处理:我如何为每个“x”创建一个对象时间 [英] Processing: How do i create an object every "x" time
问题描述
我尝试使用delay();但我失败了。
What I want to do is to create a new planet in my system for example every 10 seconds and that it starts to move and also prints a "hello" . At the end I want that the 8 planets (ellipses) will be moving together.
有人可以帮我吗?
I try to use delay(); but I failed .
Can someone help me please?
>以及 下面是一个示例程序,它画出大多数框架的小圆圈,但每60帧绘制一个大圆圈: Here is an example program that draws little circles most frames, but draws a big circle every 60 frames: 这篇关于处理:我如何为每个“x”创建一个对象时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! draw()$ c中的 frameCount 变量
void setup() {
size(500, 500);
background(0);
}
void draw() {
ellipse(mouseX, mouseY, 10, 10);
if (frameCount % 60 == 0) {
ellipse(mouseX, mouseY, 50, 50);
}
}