class NewBall extends Item{ //Class for the new ball objects appearing on the game board //Inherits following properties from Item: /* id: string pos: Vector radius: number color: Serialized.Color settings: Settings.Item time: TimeProcess */ constructor(settings: Settings.NewBall){ super(settings) } destroy(): void{ let index = game.newBalls.indexOf(this) game.newBalls.splice(index, 1) } serialized(): Serialized.NewBall{ let newBall = super.serialized() as Serialized.NewBall return newBall } show(): void{ p.push() p.translate(this.centerX, this.centerY) p.fill(this.color.fill) p.stroke(this.color.stroke) p.ellipse(0, 0, this.size, this.size) p.pop() } }