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 {
|
private spawnDot(): Dot {
|
||||||
const dotId = this.ballSpawnId++;
|
const dotId = this.ballSpawnId++;
|
||||||
let dot;
|
let dot;
|
||||||
if (this.ballSpawnId < this.MAX_DOT_COUNT) {
|
if (dotId < this.MAX_DOT_COUNT) {
|
||||||
dot = {
|
dot = {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user