MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / constructor

Method constructor

assets/js/shooting_game.js:29–35  ·  view source on GitHub ↗
(x, y, radius, color, velocity)

Source from the content-addressed store, hash-verified

27
28class Projectile {
29 constructor(x, y, radius, color, velocity) {
30 this.x = x
31 this.y = y
32 this.radius = radius
33 this.color = color
34 this.velocity = velocity
35 }
36 draw() {
37 c.beginPath()
38 c.arc(this.x, this.y, this.radius, 0, Math.PI * 2, false)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected