/// <summary>
 /// Shows the timers of the active meteors
 /// </summary>
 public void Activate()
 {
     foreach (Meteor meteor in spawner.getMeteorList())
     {
         meteor.GetComponentInChildren <HUDMeteorControler>().ShowTime();
     }
 }
Exemple #2
0
 /// <summary>
 /// Shows the shape of the active meteors
 /// </summary>
 public void Activate()
 {
     foreach (Meteor meteor in spawner.getMeteorList())
     {
         if (!meteor.ShapeRendered())
         {
             meteor.DeactivateNextShapeRenders(); // Avoids activating the render more than once when using the item multiple times
             Vector2   centralPoint = meteor.getAsignedCell().getGridPosition();
             Vector2[] shape        = meteor.getHitShape().GetHitShape();
             Dictionary <Vector2, GridCell> cellHashMap = spawner.getGridMap();
             foreach (Vector2 position in shape)
             {
                 GridCell targetGridCell;
                 cellHashMap.TryGetValue(position + centralPoint, out targetGridCell);
                 if (targetGridCell != null && !signaledMeteors.Contains(meteor))
                 {
                     if (position != Vector2.zero)
                     {
                         targetGridCell.setShapeColor();
                     }
                     else
                     {
                         targetGridCell.setHitColor();
                     }
                 }
             }
             signaledMeteors.Add(meteor);
         }
     }
 }