Added evolved birth distance

This commit is contained in:
MaxRobinsonTheGreat
2020-08-03 18:22:45 -06:00
parent add3872423
commit 310fc39216
6 changed files with 331 additions and 8 deletions

View File

@@ -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);

View File

@@ -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;