コード例 #1
0
ファイル: Plugin.cs プロジェクト: Snow1226/Rakugaki
 public void OnApplicationStart()
 {
     _harmony = new Harmony("com.Snow1226.Rakugaki");
     _harmony.PatchAll(Assembly.GetExecutingAssembly());
     Logger.log.Debug("OnApplicationStart");
     rakugakiController = new GameObject("RakugakiController").AddComponent <RakugakiController>();
 }
コード例 #2
0
 public void init(RakugakiController instance)
 {
     _rakugakiParent = instance;
     _vrPointer      = GetComponent <VRPointer>();
     Logger.log?.Debug($"{name}: init()");
     if (_vrPointer == null)
     {
         Logger.log?.Debug($"{name}: vrPointer Null");
     }
     _triggerTime = 0;
 }
コード例 #3
0
        private void Awake()
        {
            if (instance != null)
            {
                Logger.log?.Warn($"Instance of {this.GetType().Name} already exists, destroying.");
                GameObject.DestroyImmediate(this);
                return;
            }
            GameObject.DontDestroyOnLoad(this); // Don't destroy this object on scene changes
            instance = this;
            Logger.log?.Debug($"{name}: Awake()");

            MenuButton menuButton = new MenuButton(
                "Rakugaki", "scribble mod", ShowModFlowCoordinator, true);

            MenuButtons.instance.RegisterButton(menuButton);
        }
コード例 #4
0
 private void OnDestroy()
 {
     Logger.log?.Debug($"{name}: OnDestroy()");
     instance = null; // This MonoBehaviour is being destroyed, so set the static instance property to null.
 }