示例#1
0
 /// <summary>
 /// Get the instance of NPC_Manager
 /// </summary>
 /// <returns></returns>
 public static NPC_Manager GetInstance()
 {
     if (instance == null)
     {
         instance = new NPC_Manager();
     }
     return(instance);
 }
示例#2
0
 /// <summary>
 /// Switch between outside and inside, which results in a change of hitbox, doors and the outside aspect.
 /// </summary>
 public void ChangeInside()
 {
     this.is_inside = !this.is_inside;
     if (this.is_inside)
     {
         this.GetDoors()[0].SetVisible(false);
         this.GetDoors()[1].SetVisible(false);
         this.outside.SetVisible(false);
         NPC_Manager.GetInstance().MakeAllNPCsInteractives();
     }
     else
     {
         this.GetDoors()[0].SetVisible(true);
         this.GetDoors()[1].SetVisible(true);
         this.outside.SetVisible(true);
         NPC_Manager.GetInstance().MakeAllNPCsNotInteractives();
     }
 }