Skip to content

Commit

Permalink
Clang-Format enforced
Browse files Browse the repository at this point in the history
  • Loading branch information
MylesScholz committed May 22, 2024
1 parent f5a8c1b commit 0b1e637
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
6 changes: 3 additions & 3 deletions src/cell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ void Cell::_input_event(Node *viewport, Ref<InputEvent> event, int shape_idx) {
CheckButton *stats_open_check = spawner->get_node<CheckButton>("UI/MenuPanel/TabContainer/General/StatsOpenCheck");
Panel *stats_panel = spawner->get_node<Panel>("UI/StatsPanel");

if(!bar_panel->is_visible()){
if (!bar_panel->is_visible()) {
ui_cam->call("on_cell_select", this);
lineage_cam->call("select_cell", this);

Expand All @@ -356,8 +356,8 @@ void Cell::_input_event(Node *viewport, Ref<InputEvent> event, int shape_idx) {
}

if (stats_open_check->is_pressed()) {
stats_panel->show();
}
stats_panel->show();
}
}
//stats->_set_selected_cell(this);
}
Expand Down
2 changes: 1 addition & 1 deletion src/cell.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
#include "nucleus.hpp"

#include <godot_cpp/classes/camera2d.hpp>
#include <godot_cpp/classes/panel.hpp>
#include <godot_cpp/classes/check_button.hpp>
#include <godot_cpp/classes/engine.hpp>
#include <godot_cpp/classes/input_event_mouse_button.hpp>
#include <godot_cpp/classes/panel.hpp>
#include <godot_cpp/classes/random_number_generator.hpp>
#include <godot_cpp/classes/rigid_body2d.hpp>
#include <godot_cpp/classes/sprite_frames.hpp>
Expand Down
33 changes: 16 additions & 17 deletions src/cell_environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,26 @@ CellEnvironment::CellEnvironment() {
}
CellEnvironment::~CellEnvironment() {}


int CellEnvironment::GetAliveCount() {
int count = 0;
for (int i = 0; i < this->get_child_count(); i++) {
Node *child = this->get_child(i);
if (Object::cast_to<Cell>(child)) {
count++;
}
}
return count;
int count = 0;
for (int i = 0; i < this->get_child_count(); i++) {
Node *child = this->get_child(i);
if (Object::cast_to<Cell>(child)) {
count++;
}
}
return count;
}

int CellEnvironment::GetNutrientZoneCount() {
int count = 0;
for (int i = 0; i < this->get_child_count(); i++) {
Node *child = this->get_child(i);
if (Object::cast_to<NutrientZone>(child)) {
count++;
}
}
return count;
int count = 0;
for (int i = 0; i < this->get_child_count(); i++) {
Node *child = this->get_child(i);
if (Object::cast_to<NutrientZone>(child)) {
count++;
}
}
return count;
}

void CellEnvironment::spawnNutrientZone() {
Expand Down

0 comments on commit 0b1e637

Please sign in to comment.