コード例 #1
0
 // Use this for initialization
 void Start()
 {
     if (uniqueInstance == null)
         uniqueInstance = this;
     else
         Destroy(this.gameObject);
 }
コード例 #2
0
 //Method called when a random float between 0 and 1 is grater or equals as your event probability.
 public override void ExecuteEvent()
 {
     SystemMessageManager.ShowSystemMessage("Some special example event happened!", ConsoleMessageType.Warning);
     //Commented dangerous part, we don't need to destroy someone's mission just because they installed
     //example mods to see how it works
     //foreach (var room in DungeonManager.Instance.rooms)
     //{
     //    room.Radiate("Special mod event",1f);
     //}
 }