int a; double dist; double dire; point p; String st; int tt; Font f; FontMetrics fm; point fsp; double fs; double ifs; int w; //�T���v�� [setup, 300, 300]{ p = point(150, 150); st = new String("0"); tt = 0; fs =10; fsp = point(0, 0); ifs = 100; f = new Font("Helvetica", Font.PLAIN, 10); } [paint]{ clearAll(); f = new Font("Helvetica", Font.PLAIN, (int)fs); setFont(f); w = getFontMetrics(f).stringWidth(st); setColor(0, 0, 0); drawString(st, p.x - w/2, p.y + fs/4); } [intervalOn, 1]{ fsp.x = 10; fsp.velocity.x = 0; fs = 10; tt += 1; st = String.valueOf(tt); ifs = 100; } [always]{ dist = fsp.distanceTo(ifs, 0); dire = fsp.directionTo(ifs, 0); fsp.push(dist, dire); fs = fsp.x; }