浏览代码

collectibles bugfix

Dima Mironov 10 年之前
父节点
当前提交
4d7fb43108
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      js/controller.js

+ 1 - 1
js/controller.js

@@ -30,7 +30,7 @@ Controller.prototype.update_views = function(){
 Controller.prototype.spawn_collectibles = function(){
 	var collectible =get_random_element_with_probabilities(this.possible_collectibles);
 	if (!collectible) return;
-	collectible = Object.create(collectible);
+	collectible = Object.create(collectible.collectible);
 	var rnd_pos = this.get_random_position();
 	if (this.is_position_free(rnd_pos)) {
 		collectible.position = rnd_pos;