Modding:Adding Code to the Player: Difference between revisions

m
Updated example
m (Clarify when this can be used.)
m (Updated example)
Line 22: Line 22:
       public void mutate(GameObject player)
       public void mutate(GameObject player)
       {
       {
           // modify the player object before the game starts
           // modify the player object when a New Game begins
          // for example, add a custom part to the player:
          player.AddPart<MyCustomPart>();
       }
       }
   }
   }