Ejemplo n.º 1
0
 // called whenever starting a new game
 public void mutate(XRL.World.GameObject player)
 {
     // add part unconditionally
     player.AddPart <HZMapPinTogglePart>();
     // also set up ability
     HZMapPinTogglePart.AddAbility(player);
 }
Ejemplo n.º 2
0
 public static void GameLoadHandler()
 {
     XRL.World.GameObject player = XRL.Core.XRLCore.Core?.Game?.Player?.Body;
     if (player == null)
     {
         return;
     }
     // add part only if it's not already present
     player.RequirePart <HZMapPinTogglePart>();
     // also set up ability if needed
     HZMapPinTogglePart.AddAbility(player);
 }