void OnGUI() { P5JSExtension.background(51); s.Show(); P5JSExtension.fill(255, 0, 100); P5JSExtension.rect(food.x, food.y, scl, scl); }
public void Show() { P5JSExtension.fill(255); for (int i = 0; i < tail.Count; i++) { P5JSExtension.rect(tail[i].x, tail[i].y, TheSnakeGame.scl, TheSnakeGame.scl); } P5JSExtension.rect(x, y, TheSnakeGame.scl, TheSnakeGame.scl); }
void OnGUI() { P5JSExtension.resetMatrix(); P5JSExtension.background(51); for (int i = 0; i < tree.Count; i++) { tree[i].show(); //tree[i].jitter(); } for (var i = 0; i < leaves.Count; i++) { P5JSExtension.fill(255, 0, 100, 100); P5JSExtension.noStroke(); //cause error for somereason P5JSExtension.ellipse(leaves[i].x, leaves[i].y, 8, 8); leaves[i].y += P5JSExtension.random(0, 2); } }
public void show() { P5JSExtension.fill(c.r, c.g, c.b, c.a); P5JSExtension.ellipse(pos.x, pos.y, r, r); }
public void show() { P5JSExtension.fill(255, 0, 200, 150); P5JSExtension.ellipse(x, y, r * 2, r * 2); }
public void show() { P5JSExtension.fill(255); //rect mode enter hard code P5JSExtension.rect(x - 20 / 2, P5JSExtension.height - 20 - 60 / 2, 20, 60); }
public void show() { P5JSExtension.fill(150, 0, 255, 255); P5JSExtension.ellipse(x, y, r * 2, r * 2); }