Arkanoid kolejna wersja xD
Główny plik: PVector location, velocity, paddle; float d; Coin c1; int radius, score; void setup(){ size(600, 400); score = 0; c1 = new Coin(40, 40, 20); radius = 10; location = new PVector(0.5*width, 0.5*height); velocity = new PVector(2, 5); paddle = new PVector(100, 20); } void draw(){ background(0, 0, 0); noStroke(); fill(0, 180, 0); ellipse(location.x, location.y, radius, radius); rect(mouseX, height – paddle.y, paddle.x, paddle.y); location.add(velocity); c1.display(); if(location.y < 0){ velocity.y