flock.pde
来自「This is processing for java examples.」· PDE 代码 · 共 23 行
PDE
23 行
// The Flock (a list of Boid objects)class Flock { ArrayList boids; // An arraylist for all the boids Flock() { boids = new ArrayList(); // Initialize the arraylist } void run() { for (int i = 0; i < boids.size(); i++) { Boid b = (Boid) boids.get(i); b.run(boids); // Passing the entire list of boids to each boid individually } } void addBoid(Boid b) { boids.add(b); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?