Basic universe management, generation and simulation flow
This commit is contained in:
parent
4c078dbede
commit
78fceeb95e
29 changed files with 664 additions and 29 deletions
26
scripts/Universe.cs
Normal file
26
scripts/Universe.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using Godot;
|
||||
|
||||
public class Universe
|
||||
{
|
||||
public Sector[,,] Sectors;
|
||||
|
||||
public Universe(Vector3I size)
|
||||
{
|
||||
Sectors = new Sector[size.X, size.Y, size.Z];
|
||||
}
|
||||
|
||||
public Universe(int sizeX, int sizeY, int sizeZ)
|
||||
{
|
||||
Sectors = new Sector[sizeX, sizeY, sizeZ];
|
||||
}
|
||||
|
||||
public Sector GetSector(Vector3I coordinates)
|
||||
{
|
||||
return Sectors[coordinates.X, coordinates.Y, coordinates.Z];
|
||||
}
|
||||
|
||||
public Sector GetSector(int x, int y, int z)
|
||||
{
|
||||
return Sectors[x, y, z];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue