Exemplo n.º 1
0
 private function GeneratePlanets($numberOfPlanets = null)
 {
     $numberOfPlanets = $numberOfPlanets != null ? $numberOfPlanets : Random::Number();
     for ($i = 0; $i < $numberOfPlanets; $i++) {
         $this->planets[] = new Planet();
     }
 }
Exemplo n.º 2
0
 function __construct($name = null, $position = null, $radius = null)
 {
     $this->name = $name ? $name : Random::Name();
     $this->position = $position ? $position : Random::Vector3();
     $this->radius = $radius ? $radius : Random::Number();
 }