Beispiel #1
0
 public bool destroy_asteroid()
 {
     if (has_collided)
     {
         return(false);
     }
     score_keeper.add(points);
     if (spawned_debris != null)
     {
         for (int space_rock = 0; space_rock < 2; ++space_rock)
         {
             PlanetariaGameObject game_object = PlanetariaGameObject.Instantiate(spawned_debris, planetaria_transform.position, planetaria_transform.direction);
             Debris debris = game_object.GetComponent <Debris>();
             debris.speed = this.speed;
             DebrisNoirs.live(game_object);
             // while asteroid revenge velocity (targetting satellite) is an interesting idea,
             // I don't think it's necessary (or would fully work as intended for that matter - it might be exploitable).
             // The game will probably be hard enough head/joystick controls
             // (and pros will still make mistakes eventually, even if its because of sleep deprivation)
         }
     }
     DebrisNoirs.die(this.gameObject);
     PlanetariaGameObject.Destroy(this.gameObject);
     return(true);
 }
Beispiel #2
0
 public bool destroy_asteroid()
 {
     if (has_collided)
     {
         return(false);
     }
     ScoreKeeper.instance.add(points);
     if (left_debris != null)
     {
         DebrisNoirs.live(left_debris);
         left_debris.planetaria_transform.position  = this.planetaria_transform.position;
         left_debris.planetaria_transform.direction = this.planetaria_transform.direction;
         left_debris.speed = this.speed;
         left_debris.initialize();
         DebrisNoirs.live(right_debris);
         right_debris.planetaria_transform.position  = this.planetaria_transform.position;
         right_debris.planetaria_transform.direction = this.planetaria_transform.direction;
         right_debris.speed = this.speed;
         right_debris.initialize();
     }
     DebrisNoirs.die(this);
     return(true);
 }