private bool LoadFactory(string filePath)
 {
     if (File.Exists(filePath))
     {
         editingFactory       = NPC_Factory.LoadFactory(filePath);
         editorControlHandler = new NPC_FactoryControlHandler(editingFactory);
         return(true);
     }
     else
     {
         return(false);
     }
 }
コード例 #2
0
        void Awake()
        {
            NPC_Factory.InitialFactory(NPC_Factory.LoadFactory("NPC_Factory"));
            SkillFactory.InitialFactory(SkillFactory.LoadFactory("SkillFactory"));
            MonsterFactory.InitialFactory(MonsterFactory.LoadFactory("MonsterFactory"));
            ItemFactory.InitialFactory(ItemFactory.LoadFactory("ItemFactory"));
            StoreFactory.InitialFactory(StoreFactory.LoadFactory("StoreFactory"));
            World.Initial(World.LoadWorld("World"));
            StoryManager.InitialManager(Story.LoadStory("MainStory"));
            InputManager.InitialManager(new UnityInputManager());
            PlayerManager.InitialManager(new Player());

            PlayerManager.Instance.Player.Inventory.AddItem(ItemFactory.Instance.FindItem(6), 100);
        }
 private void SaveFactory(string filePath)
 {
     NPC_Factory.SaveFactory(filePath, editingFactory);
 }
 public NPC_FactoryControlHandler(NPC_Factory factory)
 {
     editingFactory = factory;
 }
 private void CreateFactory()
 {
     editingFactory       = new NPC_Factory();
     editorControlHandler = new NPC_FactoryControlHandler(editingFactory);
 }