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); }
public void show() { P5JSExtension.fill(255); //rect mode enter hard code P5JSExtension.rect(x - 20 / 2, P5JSExtension.height - 20 - 60 / 2, 20, 60); }