处理:我如何为每个“x”创建一个对象时间

编程入门 行业动态 更新时间:2024-10-15 10:20:59
本文介绍了处理:我如何为每个“x”创建一个对象时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我尝试使用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?

modulo%运算符

>以及 draw()下面是一个示例程序,它画出大多数框架的小圆圈,但每60帧绘制一个大圆圈:

Here is an example program that draws little circles most frames, but draws a big circle every 60 frames:

void setup() { size(500, 500); background(0); } void draw() { ellipse(mouseX, mouseY, 10, 10); if (frameCount % 60 == 0) { ellipse(mouseX, mouseY, 50, 50); } }

更多推荐

处理:我如何为每个“x”创建一个对象时间

本文发布于:2023-10-23 05:19:58,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:创建一个   何为   对象   时间

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!