Example #1
0
 public bool TryApply(Structure structure)
 {
     if (Mod.CanMod(structure))
     {
         structure.Mods.AddMod(UnityEngine.Object.Instantiate(Mod));
         return(true);
     }
     return(false);
 }
Example #2
0
 private bool AddMod(IModdable moddable)
 {
     if (Mod.CanMod(moddable))
     {
         moddable.Mods.AddMod(Instantiate(Mod));
         return(true);
     }
     return(false);
 }
Example #3
0
 public override IEnumerable <IModdable> GetPotentialBroadcastTargets()
 {
     foreach (Transform sibling in GetSiblings())
     {
         if (IsAdjecent(sibling.gameObject))
         {
             IModdable moddable = sibling.GetComponent <IModdable>();
             if (moddable != null && Mod.CanMod(moddable))
             {
                 yield return(moddable);
             }
         }
     }
 }