コード例 #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));
 }