@@ -148,6 +148,11 @@ Controller.prototype.remove_collectible = function(collectible){
if (i > -1) {
this.collectibles.splice(i, 1);
}
+ i = -1;
+ i = this.views.indexOf(collectible.view);
+ if (i > -1) {
+ this.views.splice(i, 1);
+ }
@@ -1,6 +1,7 @@
(function(window) {
function ParticleView(modelObject){
this.model = modelObject;
+ this.model.view = this;
var dp = this.model.draw_properties;
var cs = window.cell_size;
this.graphics
@@ -2,6 +2,7 @@
function PhysicistView(modelObject){
this.graphics.beginFill("red").drawCircle(0, 0, window.cell_size * 0.9 / 2);
PhysicistView.prototype = new createjs.Shape();