Пример #1
0
 private static void AddObjectChara_Add_Postfix()
 {
     // only fires when adding chara
     Core.DebugLog($"AddObjectChara_Add_Postfix");
     OnCharaLoad?.Invoke(null, new CharaLoadEventArgs(new OCIChar(), CharaLoadMode.Add, CharaLoadState.Post));
     Instance.StartCoroutine(AddObjectChara_Coroutine(null, CharaLoadMode.Add));
 }
Пример #2
0
 private static void AddObjectChara_Load_Postfix(OICharInfo _info)
 {
     // only fires when loading scene
     Core.DebugLog($"AddObjectChara_Load_Postfix");
     OnCharaLoad?.Invoke(null, new CharaLoadEventArgs(_info, CharaLoadMode.Load, CharaLoadState.Post));
     Instance.StartCoroutine(AddObjectChara_Coroutine(GetOCIChar(_info), CharaLoadMode.Load));
 }
Пример #3
0
 private static void OCIChar_ChangeChara_Postfix(OCIChar __instance, string _path)
 {
     // only fires when switching chara
     Core.DebugLog($"OCIChar_ChangeChara_Postfix");
     OnCharaLoad?.Invoke(null, new CharaLoadEventArgs(__instance, CharaLoadMode.Change, CharaLoadState.Post));
     //StudioInstance.StartCoroutine(OCIChar_ChangeChara_Coroutine(__instance, CharaLoadState.Post));
     Instance.StartCoroutine(OCIChar_ChangeChara_Coroutine(__instance, CharaLoadState.Coroutine));
 }
Пример #4
0
            internal static IEnumerator AddObjectChara_Coroutine(OCIChar _chara, CharaLoadMode _mode)
            {
                yield return(new WaitForEndOfFrame());

                yield return(new WaitForEndOfFrame());

                OnCharaLoad?.Invoke(null, new CharaLoadEventArgs(_chara, _mode, CharaLoadState.Coroutine));
                Core.DebugLog($"AddObjectChara_Coroutine [mode: {_mode}]");
            }
Пример #5
0
            internal static IEnumerator OCIChar_ChangeChara_Coroutine(OCIChar _chara, CharaLoadState _state)
            {
                yield return(new WaitForEndOfFrame());

                yield return(new WaitForEndOfFrame());

                yield return(new WaitForEndOfFrame());

                yield return(new WaitForEndOfFrame());

                Core.DebugLog($"OCIChar_ChangeChara_Postfix_Coroutine [state: {_state}]");

                /*
                 * if (state == CharaLoadState.Post)
                 *      StudioInstance.StartCoroutine(OCIChar_ChangeChara_Coroutine(chara, CharaLoadState.Coroutine));
                 * else
                 */
                OnCharaLoad?.Invoke(null, new CharaLoadEventArgs(_chara, CharaLoadMode.Change, _state));
            }
Пример #6
0
 private static void AddObjectChara_Load_Prefix(OICharInfo _info)
 {
     // only fires when loading scene
     Core.DebugLog($"AddObjectChara_Load_Prefix");
     OnCharaLoad?.Invoke(null, new CharaLoadEventArgs(_info, CharaLoadMode.Load, CharaLoadState.Pre));
 }
Пример #7
0
 private static void AddObjectChara_Add_Prefix()
 {
     // only fires when adding chara
     Core.DebugLog($"AddObjectChara_Add_Prefix");
     OnCharaLoad?.Invoke(null, new CharaLoadEventArgs(new OCIChar(), CharaLoadMode.Add, CharaLoadState.Pre));
 }
Пример #8
0
 private static void OCIChar_ChangeChara_Prefix(OCIChar __instance, string _path)
 {
     // only fires when switching chara
     Core.DebugLog($"OCIChar_ChangeChara_Prefix");
     OnCharaLoad?.Invoke(null, new CharaLoadEventArgs(__instance, CharaLoadMode.Change, CharaLoadState.Pre));
 }