示例#1
0
 private void ChangeLaserIntensity(int index, float newIntensity)
 {
     if (elementPositions.ContainsKey(laserName) && index < elementPositions[laserName].Count)
     {
         Vector2Int   pos   = elementPositions[laserName][index];
         LaserEmitter laser = (LaserEmitter)board[pos.x, pos.y].GetPlacedObject();
         if (laser != null)
         {
             laser.ChangeIntensity(newIntensity);
             currentSteps++;
         }
     }
 }