예제 #1
0
파일: ModApi.cs 프로젝트: nug700/modCore
 public ModApi(ModCore _core)
 {
     modCore = _core;
     monitorComp = GameObject.Find("monitor").GetComponent<Monitor>();
     terrainModification = monitorComp.gameObject.AddComponent<ModCoreModificationHandler>();
     terrainModification.core = _core;
     SearchForModels();
 }
예제 #2
0
파일: ModCore.cs 프로젝트: nug700/modCore
 public static void Init()
 {
     if (modCore == null) {
         modCore = new ModCore();
     }
     else
         LogError("Only one modCore instance allowed.");
 }
예제 #3
0
 public void Init(ModCore core)
 {
     if (core != null && core.API != null)
     {
         modCore = core;
         modApi = core.API;
         monitor = core.monitorComp;
         utilMonitor = new GameObject("UtilMontior").AddComponent<UtilMonitor>();
         utilMonitor.modCore = core;
         utilMonitor.api = core.API;
         addCommands();
         modCore.Log(Name + " started successfully!");
     }
     else if (core == null)
         Debug.Log("PluginUtils Error: modcore is null!");
     else if (core.API == null)
         Debug.Log("PluginUtils Error: API is null!");
 }