本帖最后由 kaka 于 2015-12-2 15:54 编辑
- int th, tm, ts, oth, otm, ots;
- void setup() {
- size (600, 480);
- frameRate(30);
-
- smooth();
- th=hour();
- tm=minute();
- ts=second();
- oth=th;
- otm=tm;
- ots=ts;
-
-
- }
- void draw() {
- background(200);
- th=hour();
- tm=minute();
- ts=second();
- textSize(40);
- fill(0);
- text(": :", 180, 117);
- fill(200);
-
- text(oth, 130, 120);
- text(otm, 200, 120);
- text(ots, 270, 120);
- fill(0);
- text(th, 130, 120);
- text(tm, 200, 120);
- text(ts, 270, 120);
- oth=th;
- otm=tm;
- ots=ts;
- }
复制代码
效果展示
|