예제 #1
0
파일: Rune.cs 프로젝트: Greaka/RuneShift
 private static void GetAdjacentRunesRecursivelyHelper(Rune startRune, HashSet<Rune> visitedRunes)
 {
     visitedRunes.Add(startRune);
     foreach (Rune adjacentRune in startRune.AdjacentRunes)
     {
         if(!visitedRunes.Contains(adjacentRune))
             GetAdjacentRunesRecursivelyHelper(adjacentRune, visitedRunes);
     }
 }
예제 #2
0
 private void CreateRuneAdjacency(Rune r1, Rune r2)
 {
     r1.AdjacentRunes.Add(r2);
     r2.AdjacentRunes.Add(r1);
 }
예제 #3
0
파일: Rune.cs 프로젝트: Greaka/RuneShift
 public static HashSet<Rune> GetAdjacentRunesRecursively(Rune startRune)
 {
     HashSet<Rune> visitedRunes = new HashSet<Rune>();
     GetAdjacentRunesRecursivelyHelper(startRune, visitedRunes);
     return visitedRunes;
 }
예제 #4
0
 public RuneBoundParticleSwarm(int particleCount, Rune rune)
     : base(particleCount, rune.Position, RuneColor(rune.GetType()))
 {
     this.Rune = rune;
     rune.particleSwarm = this;
 }