Ships, Galaxy functions, and more!
So this latest incarnation incorporates some cool stuff. In the Galaxy object, I’ve built functionality so you can query the Galaxy to return only stars that are owned by a particular civilization. The usage:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
local data= { -- The width and height of the -- galaxy in units. Pixels, light years, -- hey it's up to you, -- Number of civilizations -- minimum distance from another civilization width = screenW, height = screenH, civilizations = 1, min_dist_from_civilizations = 200, max_dist_from_civilizations = 400, } local galaxy = Galaxy:new(data) starModel = galaxy:GetAllStarsBelongingToACivilization(galaxy.civilizations[1]) |
That will return a table with all the star objects that belong to civilization 1 …