add ball with click but remove oldest dot when limit reached
This commit is contained in:
@@ -96,7 +96,7 @@ export class DotBackground implements OnDestroy {
|
||||
private spawnDot(): Dot {
|
||||
const dotId = this.ballSpawnId++;
|
||||
let dot;
|
||||
if (this.ballSpawnId < this.MAX_DOT_COUNT) {
|
||||
if (dotId < this.MAX_DOT_COUNT) {
|
||||
dot = {
|
||||
x: 0,
|
||||
y: 0,
|
||||
|
||||
Reference in New Issue
Block a user