Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-2/cuujooceevii61
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
class bullet {
|
||||
constructor(x, y, angle, speed, radius, color) {
|
||||
//Een constructor voert eerst de code uit die er in staat voordat de rest van de class wordt uitgevoerd.
|
||||
constructor(x, y, radius, speed) {
|
||||
//"This" moet gebruikt worden om de variabelen aan te maken in de class en het zorgt er voor dat de variabelen niet alleen in de constructor gebruikt kunnen worden,
|
||||
//maar ook in de rest van de class
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.angle = angle;
|
||||
this.speed = speed;
|
||||
this.radius = radius;
|
||||
this.color = color;
|
||||
this.speed = speed;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user