Godot Nature of Code
1.2.0
Nature of Code implemented in Godot Engine
|
Boolean cellular automata 2D. More...
Public Member Functions | |
GameOfLife () | |
Create a standard game of life of scale 20. More... | |
GameOfLife (int scale) | |
Create a Game of Life instance of custom scale. More... | |
![]() | |
CellularAutomata2D () | |
Create a default cellular automata with a cell scale of 20. More... | |
CellularAutomata2D (int scale) | |
Create a default cellular automata with a custom cell scale. More... | |
virtual void | RandomizeGrid () |
Randomize grid. More... | |
Additional Inherited Members | |
![]() | |
virtual Vector2 | GetAutomataBounds () |
Get automata bounds. More... | |
virtual void | InitializeGrid () |
Initialize grid. More... | |
virtual void | InitializeCell (TCell cell, int i, int j) |
Initialize cell. More... | |
virtual void | ReviveCellAtScreenPos (Vector2 pos) |
Revive cell at screen position. More... | |
virtual int | GetAliveNeighborsFromCell (int x, int y) |
Get alive neighbors from cell position. More... | |
virtual T | ApplyRules (int x, int y) |
Apply rules on cell and return next state. More... | |
virtual void | Generate () |
Create a new generation. More... | |
![]() | |
TCell[] | _grid |
Grid nodes More... | |
int | _scale |
Cell scale More... | |
int | _rows |
Row count More... | |
int | _cols |
Cols count More... | |
int | _generation |
Current generation More... | |
Node2D | _gridContainer |
Grid container More... | |
![]() | |
float | WaitTime [get, set] |
Wait time More... | |
Color | CellColor [get, set] |
Cell color More... | |
bool | Paused [get, set] |
Paused More... | |
bool | HighlightTransitions [get, set] |
Highlight when a cell is transitioning from life to death More... | |
bool | CenterAlignedGrid [get, set] |
Align grid to the center More... | |
bool | HideGUI [get, set] |
Hide GUI More... | |
TouchBehaviorEnum | TouchBehavior [get, set] |
Touch behavior More... | |
WrapBehaviorEnum | WrapBehavior [get, set] |
Wrap behavior More... | |
Boolean cellular automata 2D.
Definition at line 22 of file GameOfLife.cs.
|
inline |
Create a standard game of life of scale 20.
Definition at line 27 of file GameOfLife.cs.
|
inline |
Create a Game of Life instance of custom scale.
scale | Scale |
Definition at line 33 of file GameOfLife.cs.