Added evolved birth distance
This commit is contained in:
@@ -190,6 +190,7 @@ class ControlPanel {
|
||||
$('.edit-mode-btn').click( function() {
|
||||
var prev_mode = self.env_controller.mode;
|
||||
$('#cell-selections').css('display', 'none');
|
||||
$('#organism-options').css('display', 'none');
|
||||
switch(this.id){
|
||||
case "food-drop":
|
||||
self.setMode(Modes.FoodDrop);
|
||||
@@ -206,6 +207,7 @@ class ControlPanel {
|
||||
case "edit":
|
||||
self.setMode(Modes.Edit);
|
||||
$('#cell-selections').css('display', 'block');
|
||||
$('#organism-options').css('display', 'block');
|
||||
break;
|
||||
case "drop-org":
|
||||
self.setMode(Modes.Clone);
|
||||
|
||||
@@ -9,6 +9,7 @@ class EditorController extends CanvasController{
|
||||
this.edit_cell_type = null;
|
||||
this.highlight_org = false;
|
||||
this.defineCellTypeSelection();
|
||||
this.defineEditorOptions();
|
||||
}
|
||||
|
||||
mouseMove() {
|
||||
@@ -56,6 +57,13 @@ class EditorController extends CanvasController{
|
||||
$(selected).css("border-color", "yellow");
|
||||
});
|
||||
}
|
||||
|
||||
defineEditorOptions() {
|
||||
$('#birth-distance').change ( function() {
|
||||
this.env.organism.birth_distance = $('#birth-distance').val();
|
||||
}.bind(this));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = EditorController;
|
||||
|
||||
Reference in New Issue
Block a user