NotifySymbiosisClusterAdded() 공개 메소드

public NotifySymbiosisClusterAdded ( Cluster symbiosisCluster ) : void
symbiosisCluster Cluster
리턴 void
예제 #1
0
 public static ClusterPlant TryToSpawnNewSymbiosisCluster(Cluster cluster)
 {
     // Check there is not already a symbiosis cluster.
     if (cluster.symbiosisCluster == null)
     {
         foreach (IntVec3 cell in GenRadial.RadialCellsAround(cluster.Position, cluster.plantDef.clusterSpawnRadius, false).InRandomOrder())
         {
             if (cell.InBounds() == false)
             {
                 continue;
             }
             ClusterPlant plant = cell.GetFirstThing(cluster.plantDef) as ClusterPlant;
             if (plant != null)
             {
                 plant.Destroy();
                 ClusterPlant symbiosisPlant = Cluster.SpawnNewClusterAt(cell, cluster.plantDef.symbiosisPlantDefEvolution, cluster.plantDef.symbiosisPlantDefEvolution.clusterSizeRange.RandomInRange);
                 cluster.NotifySymbiosisClusterAdded(symbiosisPlant.cluster);
                 return(symbiosisPlant);
             }
         }
     }
     return(null);
 }
 public static ClusterPlant TryToSpawnNewSymbiosisCluster(Cluster cluster)
 {
     // Check there is not already a symbiosis cluster.
     if (cluster.symbiosisCluster == null)
     {
         foreach (IntVec3 cell in GenRadial.RadialCellsAround(cluster.Position, cluster.plantDef.clusterSpawnRadius, false).InRandomOrder())
         {
             if (cell.InBounds() == false)
             {
                 continue;
             }
             ClusterPlant plant = cell.GetFirstThing(cluster.plantDef) as ClusterPlant;
             if (plant != null)
             {
                 plant.Destroy();
                 ClusterPlant symbiosisPlant = Cluster.SpawnNewClusterAt(cell, cluster.plantDef.symbiosisPlantDefEvolution, cluster.plantDef.symbiosisPlantDefEvolution.clusterSizeRange.RandomInRange);
                 cluster.NotifySymbiosisClusterAdded(symbiosisPlant.cluster);
                 return symbiosisPlant;
             }
         }
     }
     return null;
 }