C# Class Beyond_Beyaan.Galaxy

Afficher le fichier Open project: Beyonders/Beyond-Beyaan Class Usage Examples

Méthodes publiques

Свойство Type Description
OnGenerateComplete System.Action

Méthodes publiques

Méthode Description
GenerateGalaxy ( GALAXYTYPE galaxyType, int minPlanets, int maxPlanets, Random r, string &reason ) : bool

Set up the galaxy

GenerateTravelNode ( StarSystem origin, StarSystem destination ) : TravelNode
GenerateTravelNode ( float xPos, float yPos, StarSystem destination ) : TravelNode
GetAllStars ( ) : List
GetPath ( float currentX, float currentY, StarSystem currentDestination, StarSystem newDestination, bool hasExtended, Empire whichEmpire ) : List

Pathfinding function

GetStarAtPoint ( Point point ) : StarSystem
GetStarWithID ( int id ) : StarSystem
GetStarsInArea ( float left, float top, float width, float height ) : List

Get all stars in the area for drawing purposes

Load ( System.Xml.Linq.XElement root, GameMain gameMain ) : bool
Reconcilate ( EmpireManager empireManager ) : void
Save ( XmlWriter writer ) : void
SetHomeworld ( Empire empire, Planet &homePlanet ) : StarSystem
Update ( float frameDeltaTime, Random r ) : void

Private Methods

Méthode Description
FillGalaxyWithStars ( int numberOfStars, int minPlanets, int maxPlanets, bool grid, Random r ) : void
GenerateGalaxyCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void
GenerateGalaxyThread ( object sender, DoWorkEventArgs e ) : void
GenerateRandom ( GALAXYTYPE type ) : bool[][]
IsDestinationValid ( StarSystem destination, bool hasExtended, Empire whichEmpire ) : bool

Method Details

GenerateGalaxy() public méthode

Set up the galaxy
public GenerateGalaxy ( GALAXYTYPE galaxyType, int minPlanets, int maxPlanets, Random r, string &reason ) : bool
galaxyType GALAXYTYPE
minPlanets int
maxPlanets int
r System.Random
reason string
Résultat bool

GenerateTravelNode() public méthode

public GenerateTravelNode ( StarSystem origin, StarSystem destination ) : TravelNode
origin StarSystem
destination StarSystem
Résultat TravelNode

GenerateTravelNode() public méthode

public GenerateTravelNode ( float xPos, float yPos, StarSystem destination ) : TravelNode
xPos float
yPos float
destination StarSystem
Résultat TravelNode

GetAllStars() public méthode

public GetAllStars ( ) : List
Résultat List

GetPath() public méthode

Pathfinding function
public GetPath ( float currentX, float currentY, StarSystem currentDestination, StarSystem newDestination, bool hasExtended, Empire whichEmpire ) : List
currentX float Fleet's Galaxy X
currentY float Fleet's Galaxy Y
currentDestination StarSystem Fleet's current destination for when empire don't have hyperspace communications
newDestination StarSystem New destination
hasExtended bool
whichEmpire Empire For fuel range and other info
Résultat List

GetStarAtPoint() public méthode

public GetStarAtPoint ( Point point ) : StarSystem
point Point
Résultat StarSystem

GetStarWithID() public méthode

public GetStarWithID ( int id ) : StarSystem
id int
Résultat StarSystem

GetStarsInArea() public méthode

Get all stars in the area for drawing purposes
public GetStarsInArea ( float left, float top, float width, float height ) : List
left float
top float
width float
height float
Résultat List

Load() public méthode

public Load ( System.Xml.Linq.XElement root, GameMain gameMain ) : bool
root System.Xml.Linq.XElement
gameMain GameMain
Résultat bool

Reconcilate() public méthode

public Reconcilate ( EmpireManager empireManager ) : void
empireManager EmpireManager
Résultat void

Save() public méthode

public Save ( XmlWriter writer ) : void
writer System.Xml.XmlWriter
Résultat void

SetHomeworld() public méthode

public SetHomeworld ( Empire empire, Planet &homePlanet ) : StarSystem
empire Empire
homePlanet Planet
Résultat StarSystem

Update() public méthode

public Update ( float frameDeltaTime, Random r ) : void
frameDeltaTime float
r System.Random
Résultat void

Property Details

OnGenerateComplete public_oe property

public Action,System OnGenerateComplete
Résultat System.Action