[all] Add a ball on click; regenerate the field on right click

This commit is contained in:
Eryn Wells 2017-08-06 08:24:50 -07:00
parent 9297302a75
commit 357db9a248
2 changed files with 25 additions and 2 deletions

View file

@ -110,6 +110,10 @@ public class Field {
populateBallBuffer()
}
public func clear() {
balls.removeAll(keepingCapacity: true)
}
// MARK: - Metal Configuration
private var device: MTLDevice?