Exemplo n.º 1
0
 def __init__(self, universe, radius):
     self.name = None
     self.mass = Particle.Mass(universe)
     self.mass.universe_radius = radius
     self.mass.universe_location = 0, 0 # Put this at the origin
     self.mass.permanent = True
     self.mass.invisible = False
     self.mass.colour = (255, 255, 255, 255)
Exemplo n.º 2
0
 def __init__(self, universe, radius):
     self.name = None
     self.mass = Particle.Mass(universe)
     self.mass.universe_radius = radius
     self.mass.universe_location = 0, 0  # Put this at the origin
     self.mass.permanent = True
     self.mass.invisible = False
     self.products = None
     self.world_type = self.get_world_type()
Exemplo n.º 3
0
def create_orbiting_particles_equi(universe, elements, central, numParticles,
                                   distance, base_angle, velocity, recurse):
    if recurse > 0:
        angle_delta = math.pi * 2.0 / numParticles
        for i in xrange(0, numParticles):
            pNew = Particle.Mass(universe)
            pNew.invisible = True
            if recurse == 1:
                pNew.invisible = False
            pNew.enter_orbit(central, distance, base_angle + angle_delta * i,
                             velocity)
            elements.append(pNew)
            create_orbiting_particles_equi(universe, elements, pNew,
                                           numParticles, int(distance / 3 * 2),
                                           random.random() * math.pi / 2,
                                           -velocity * 2.2, recurse - 1)
Exemplo n.º 4
0
 def __init__(self, universe, radius):
     self.name = None
     self.mass = Particle.Mass(universe)
     self.mass.universe_radius = radius
     self.mass.universe_location = 0, 0  # Put this at the origin
     self.mass.permanent = True
     self.mass.invisible = False
     self.mass.colour = (40, 60, 255, 255)
     self.texture = VesselRenderer9.makeShip(
         (0, 0),
         universe.universe_configuration.R.randint(-999999999999,
                                                   999999999999),
         (radius << 1, radius)).gfx
     self.trade_targets = []
     self.trade_target_current = None
     self.move_targets = []
     self.move_target_current = None