Ejemplo n.º 1
0
 /// <summary>
 /// Inserts the IStaticGameObject to the SolarSystem and sets SolarSystem visibility
 /// to the object. Also checks if the inserting item is Gate, if the object is so sets
 /// the indicator.
 /// </summary>
 /// <param name="isgo">The inserting object.</param>
 public void AddISGO(IStaticGameObject isgo)
 {
     if (!isgoObjectDict.ContainsKey(isgo.Name))
     {
         var gate = isgo as Gate;
         if (gate != null)
         {
             hasGate = true;
         }
         isgoObjectDict.Add(isgo.Name, isgo);
         isgo.ChangeVisible(active);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Sets the SolarSystem to invisible mode and changes visibility (to false) for each
 /// object in the SolarSystem.
 /// </summary>
 public void HideSolarSystem()
 {
     if (active)
     {
         foreach (var isgoPair in isgoObjectDict)
         {
             isgoPair.Value.ChangeVisible(false);
         }
         foreach (var imgoPair in imgoObjectDict)
         {
             imgoPair.Value.ChangeVisible(false);
         }
         foreach (var bullet in bulletDict)
         {
             bullet.Value.ChangeVisible(false);
         }
         if (sun != null)
         {
             sun.ChangeVisible(false);
         }
         active = false;
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Inserts the IStaticGameObject to the SolarSystem and sets SolarSystem visibility
 /// to the object. Also checks if the inserting item is Gate, if the object is so sets
 /// the indicator.
 /// </summary>
 /// <param name="isgo">The inserting object.</param>
 public void AddISGO(IStaticGameObject isgo)
 {
     if (!isgoObjectDict.ContainsKey(isgo.Name)) {
         var gate = isgo as Gate;
         if (gate != null) {
             hasGate = true;
         }
         isgoObjectDict.Add(isgo.Name, isgo);
         isgo.ChangeVisible(active);
     }
 }