|
@@ -138,14 +138,33 @@ public class DanceMain : MonoBehaviour
|
|
|
this.maid_event_binary_.AttachObject(this.m_AnimatorData.getTake(this.m_strPlayTakeName));
|
|
|
}
|
|
|
}
|
|
|
- foreach (string str in this.m_listKuchiPakuFile)
|
|
|
+ this.m_listKuchiPattern = new string[this.m_listKuchiPakuFile.Count];
|
|
|
+ Func<string, string> func = delegate(string fn)
|
|
|
{
|
|
|
- TextAsset textAsset = Resources.Load("SceneDance/" + str) as TextAsset;
|
|
|
- NDebug.Assert(textAsset != null, "口パクパターンテキストファイルが開けません。" + str);
|
|
|
- string text = textAsset.text;
|
|
|
- NDebug.Assert(text.Length != 0, "口パクパターンファイル内が空です。" + str);
|
|
|
- text = Regex.Replace(text, "(\\r|\\n| )", string.Empty);
|
|
|
- this.m_listKuchiPattern.Add(text);
|
|
|
+ TextAsset textAsset = Resources.Load("SceneDance/" + fn) as TextAsset;
|
|
|
+ NDebug.Assert(textAsset != null, "口パクパターンテキストファイルが開けません。" + fn);
|
|
|
+ string text3 = textAsset.text;
|
|
|
+ NDebug.Assert(text3.Length != 0, "口パクパターンファイル内が空です。" + fn);
|
|
|
+ return Regex.Replace(text3, "(\\r|\\n| )", string.Empty);
|
|
|
+ };
|
|
|
+ for (int l = 0; l < this.m_listKuchiPakuFile.Count; l++)
|
|
|
+ {
|
|
|
+ string text = this.m_listKuchiPakuFile[l];
|
|
|
+ if (!string.IsNullOrEmpty(text))
|
|
|
+ {
|
|
|
+ this.m_listKuchiPattern[l] = func(text);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.m_KuchipakuCacheFileName != null)
|
|
|
+ {
|
|
|
+ for (int m2 = 0; m2 < this.m_KuchipakuCacheFileName.Length; m2++)
|
|
|
+ {
|
|
|
+ string text2 = this.m_KuchipakuCacheFileName[m2];
|
|
|
+ if (!string.IsNullOrEmpty(text2))
|
|
|
+ {
|
|
|
+ this.m_KuchiPatternCache[text2] = func(text2);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
this.m_AnimatorData.playOnStart = null;
|
|
|
this.m_AnimatorData.bAutoTimeUpdate = false;
|
|
@@ -164,9 +183,9 @@ public class DanceMain : MonoBehaviour
|
|
|
{
|
|
|
gameObject.GetComponent<RhythmAction_Mgr>().InstanceInit();
|
|
|
}
|
|
|
- for (int l = 0; l < this.m_listTestPreset.Count; l++)
|
|
|
+ for (int n = 0; n < this.m_listTestPreset.Count; n++)
|
|
|
{
|
|
|
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(l);
|
|
|
+ Maid maid = GameMain.Instance.CharacterMgr.GetMaid(n);
|
|
|
if (maid)
|
|
|
{
|
|
|
if (!this.m_maidUser)
|
|
@@ -187,68 +206,107 @@ public class DanceMain : MonoBehaviour
|
|
|
GameMain.Instance.CharacterMgr.ResetCharaPosAll();
|
|
|
if (DanceMain.SelectDanceData != null)
|
|
|
{
|
|
|
- for (int m = 0; m < DanceMain.SelectDanceData.select_chara_num; m++)
|
|
|
+ for (int num = 0; num < DanceMain.SelectDanceData.select_chara_num; num++)
|
|
|
{
|
|
|
- RhythmAction_Mgr.Instance.FactOrderList.Add(GameMain.Instance.CharacterMgr.GetMaid(m));
|
|
|
+ RhythmAction_Mgr.Instance.FactOrderList.Add(GameMain.Instance.CharacterMgr.GetMaid(num));
|
|
|
}
|
|
|
}
|
|
|
if (RhythmAction_Mgr.NowDance != RhythmAction_Mgr.DanceType.BenchMark && DanceMain.SelectDanceData != null && DanceMain.SelectDanceData.maid_order.Count > 0)
|
|
|
{
|
|
|
List<Maid> list = new List<Maid>();
|
|
|
- for (int n = 0; n < DanceMain.SelectDanceData.maid_order.Count; n++)
|
|
|
+ for (int num2 = 0; num2 < DanceMain.SelectDanceData.maid_order.Count; num2++)
|
|
|
{
|
|
|
- list.Add(GameMain.Instance.CharacterMgr.GetMaid(n));
|
|
|
+ list.Add(GameMain.Instance.CharacterMgr.GetMaid(num2));
|
|
|
}
|
|
|
GameMain.Instance.CharacterMgr.DeactivateCharaAll();
|
|
|
GameMain.Instance.CharacterMgr.DeactivateMaid(0);
|
|
|
- for (int num = 0; num < DanceMain.SelectDanceData.maid_order.Count; num++)
|
|
|
+ for (int num3 = 0; num3 < DanceMain.SelectDanceData.maid_order.Count; num3++)
|
|
|
{
|
|
|
- int index = DanceMain.SelectDanceData.maid_order[num];
|
|
|
+ int index = DanceMain.SelectDanceData.maid_order[num3];
|
|
|
if (list[index])
|
|
|
{
|
|
|
- GameMain.Instance.CharacterMgr.SetActiveMaid(list[index], num);
|
|
|
+ GameMain.Instance.CharacterMgr.SetActiveMaid(list[index], num3);
|
|
|
list[index].Visible = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (RhythmAction_Mgr.Instance.FactOrderList.Any((Maid e) => !e) || DanceMain.SelectDanceData == null)
|
|
|
+ if (this.m_listTestPreset.Count <= RhythmAction_Mgr.Instance.FactOrderList.Count)
|
|
|
{
|
|
|
- for (int num2 = 0; num2 < this.m_listTestPreset.Count; num2++)
|
|
|
+ if (!RhythmAction_Mgr.Instance.FactOrderList.Any((Maid e) => !e) && DanceMain.SelectDanceData != null)
|
|
|
{
|
|
|
- Maid maid2 = GameMain.Instance.CharacterMgr.GetMaid(num2);
|
|
|
- if (!maid2)
|
|
|
+ goto IL_97D;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (int num4 = 0; num4 < this.m_listTestPreset.Count; num4++)
|
|
|
+ {
|
|
|
+ Maid maid2 = GameMain.Instance.CharacterMgr.GetMaid(num4);
|
|
|
+ if (!maid2)
|
|
|
+ {
|
|
|
+ maid2 = GameMain.Instance.CharacterMgr.AddStockMaid();
|
|
|
+ GameMain.Instance.CharacterMgr.SetActiveMaid(maid2, num4);
|
|
|
+ CharacterMgr.Preset preset;
|
|
|
+ if (DanceMain.SelectDanceData != null && num4 < DanceMain.SelectDanceData.preset_name.Count && !string.IsNullOrEmpty(DanceMain.SelectDanceData.preset_name[num4]))
|
|
|
{
|
|
|
- maid2 = GameMain.Instance.CharacterMgr.AddStockMaid();
|
|
|
- GameMain.Instance.CharacterMgr.SetActiveMaid(maid2, num2);
|
|
|
- CharacterMgr.Preset preset;
|
|
|
- if (DanceMain.SelectDanceData != null && !string.IsNullOrEmpty(DanceMain.SelectDanceData.preset_name[num2]))
|
|
|
- {
|
|
|
- preset = GameMain.Instance.CharacterMgr.PresetLoadFromResources(DanceMain.SelectDanceData.preset_name[num2]);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- preset = GameMain.Instance.CharacterMgr.PresetLoadFromResources(this.m_listTestPreset[num2]);
|
|
|
- }
|
|
|
- if (preset != null)
|
|
|
- {
|
|
|
- GameMain.Instance.CharacterMgr.PresetSet(maid2, preset);
|
|
|
- }
|
|
|
- this.m_listTempMaid.Add(maid2);
|
|
|
- maid2.Visible = true;
|
|
|
+ preset = GameMain.Instance.CharacterMgr.PresetLoadFromResources(DanceMain.SelectDanceData.preset_name[num4]);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ preset = GameMain.Instance.CharacterMgr.PresetLoadFromResources(this.m_listTestPreset[num4]);
|
|
|
+ }
|
|
|
+ if (preset != null)
|
|
|
+ {
|
|
|
+ GameMain.Instance.CharacterMgr.PresetSet(maid2, preset);
|
|
|
+ }
|
|
|
+ this.m_listTempMaid.Add(maid2);
|
|
|
+ maid2.Visible = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (DanceMain.SelectDanceData != null)
|
|
|
+ {
|
|
|
+ for (int num5 = 0; num5 < DanceMain.SelectDanceData.maid_order.Count; num5++)
|
|
|
+ {
|
|
|
+ int index2 = DanceMain.SelectDanceData.maid_order[num5];
|
|
|
+ if (!RhythmAction_Mgr.Instance.FactOrderList[index2])
|
|
|
+ {
|
|
|
+ RhythmAction_Mgr.Instance.FactOrderList[index2] = GameMain.Instance.CharacterMgr.GetMaid(num5);
|
|
|
}
|
|
|
}
|
|
|
- if (DanceMain.SelectDanceData != null)
|
|
|
+ }
|
|
|
+ IL_97D:
|
|
|
+ if (this.m_PresetCopyToDummyChara != null)
|
|
|
+ {
|
|
|
+ NDebug.Assert(this.m_PresetCopyToDummyChara.Length <= this.m_listDummyAnimChara.Count<GameObject>(), "PresetCopyToDummyChara は listDummyAnimChara の数以下である必要があります。");
|
|
|
+ for (int num6 = 0; num6 < this.m_PresetCopyToDummyChara.Length; num6++)
|
|
|
{
|
|
|
- for (int num3 = 0; num3 < DanceMain.SelectDanceData.maid_order.Count; num3++)
|
|
|
+ int num7 = this.m_PresetCopyToDummyChara[num6];
|
|
|
+ if (num7 != num6)
|
|
|
{
|
|
|
- int index2 = DanceMain.SelectDanceData.maid_order[num3];
|
|
|
- if (!RhythmAction_Mgr.Instance.FactOrderList[index2])
|
|
|
+ Maid maid3 = GameMain.Instance.CharacterMgr.GetMaid(num7);
|
|
|
+ if (maid3)
|
|
|
{
|
|
|
- RhythmAction_Mgr.Instance.FactOrderList[index2] = GameMain.Instance.CharacterMgr.GetMaid(num3);
|
|
|
+ byte[] buffer = GameMain.Instance.CharacterMgr.PresetSaveNotWriteFile(maid3, CharacterMgr.PresetType.All);
|
|
|
+ BinaryReader binaryReader = new BinaryReader(new MemoryStream(buffer));
|
|
|
+ CharacterMgr.Preset f_prest = GameMain.Instance.CharacterMgr.PresetLoad(binaryReader, string.Empty);
|
|
|
+ binaryReader.Close();
|
|
|
+ Maid maidDest = GameMain.Instance.CharacterMgr.GetMaid(num6);
|
|
|
+ if (maidDest != null && this.m_listTempMaid.Find((Maid m) => m == maidDest) != null)
|
|
|
+ {
|
|
|
+ GameMain.Instance.CharacterMgr.PresetSet(maidDest, f_prest);
|
|
|
+ maidDest.AllProcPropSeqStart();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Debug.LogError("Presetコピー先メイドが居ないか、一時雇用メイドではありません。");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ this.m_KuchipakuAudioStartTimeAtMaid = new float[this.m_listDummyAnimChara.Count<GameObject>()];
|
|
|
+ for (int num8 = 0; num8 < this.m_KuchipakuAudioStartTimeAtMaid.Length; num8++)
|
|
|
+ {
|
|
|
+ this.m_KuchipakuAudioStartTimeAtMaid[num8] = 0f;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private void Start()
|
|
@@ -347,6 +405,44 @@ public class DanceMain : MonoBehaviour
|
|
|
GameMain.Instance.MainCamera.FadeIn(f_fTime, false, null, false, true, default(Color));
|
|
|
}
|
|
|
|
|
|
+ public void ChangeAnimation(int maidNo, string animName, float fadeTime)
|
|
|
+ {
|
|
|
+ Maid maid = GameMain.Instance.CharacterMgr.GetMaid(maidNo);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ maid.CrossFade(animName + ".anm", false, false, false, fadeTime, 1f);
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ NDebug.Assert(string.Concat(new object[]
|
|
|
+ {
|
|
|
+ "ChangeAnimation メイド ",
|
|
|
+ maidNo,
|
|
|
+ " : ",
|
|
|
+ animName,
|
|
|
+ " は不正です。\n",
|
|
|
+ ex.Message
|
|
|
+ }), false);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void ChangeKuchipaku(int maidNo, string kuchipakuName)
|
|
|
+ {
|
|
|
+ Maid maid = GameMain.Instance.CharacterMgr.GetMaid(maidNo);
|
|
|
+ maid.StartKuchipakuPattern((!(this.m_audioNew != null)) ? 0f : (this.m_audioNew.time * -1f), this.m_KuchiPatternCache[kuchipakuName], true);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetActiveObj(GameObject targetObj, bool visible)
|
|
|
+ {
|
|
|
+ targetObj.SetActive(visible);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetEyeTarget(int maidNo, GameObject targetObj)
|
|
|
+ {
|
|
|
+ Maid maid = GameMain.Instance.CharacterMgr.GetMaid(maidNo);
|
|
|
+ maid.EyeToTargetObject(targetObj.transform, 0f);
|
|
|
+ }
|
|
|
+
|
|
|
private void ChangeObj(AMTake f_take, string f_strOldObjName, GameObject f_goNew)
|
|
|
{
|
|
|
AMTranslationTrack[] array = f_take.findTranslationTrack(f_strOldObjName);
|
|
@@ -369,6 +465,7 @@ public class DanceMain : MonoBehaviour
|
|
|
public void OnDestroy()
|
|
|
{
|
|
|
this.Uninit();
|
|
|
+ NUty.GCFree();
|
|
|
Debug.Log("DanceMain::OnDestroy");
|
|
|
}
|
|
|
|
|
@@ -411,19 +508,24 @@ public class DanceMain : MonoBehaviour
|
|
|
this.m_listMaid[i].AllIKDetach(0f);
|
|
|
this.m_listMaid[i].SetAutoTwist(Maid.AutoTwist.WristL, true);
|
|
|
this.m_listMaid[i].SetAutoTwist(Maid.AutoTwist.WristR, true);
|
|
|
+ Transform[] componentsInChildren = this.m_listMaid[i].gameObject.GetComponentsInChildren<Transform>(true);
|
|
|
+ foreach (Transform transform in componentsInChildren)
|
|
|
+ {
|
|
|
+ transform.gameObject.layer = LayerMask.NameToLayer("Charactor");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- for (int j = 0; j < this.m_listItemObject.Count; j++)
|
|
|
+ for (int k = 0; k < this.m_listItemObject.Count; k++)
|
|
|
{
|
|
|
- if (this.m_listItemObject[j] != null)
|
|
|
+ if (this.m_listItemObject[k] != null)
|
|
|
{
|
|
|
- UnityEngine.Object.DestroyImmediate(this.m_listItemObject[j]);
|
|
|
+ UnityEngine.Object.DestroyImmediate(this.m_listItemObject[k]);
|
|
|
}
|
|
|
}
|
|
|
this.m_listItemObject.Clear();
|
|
|
- for (int k = 0; k < this.m_listTempMaid.Count; k++)
|
|
|
+ for (int l = 0; l < this.m_listTempMaid.Count; l++)
|
|
|
{
|
|
|
- GameMain.Instance.CharacterMgr.BanishmentMaid(this.m_listTempMaid[k]);
|
|
|
+ GameMain.Instance.CharacterMgr.BanishmentMaid(this.m_listTempMaid[l]);
|
|
|
}
|
|
|
if (!DanceMain.KaraokeMode)
|
|
|
{
|
|
@@ -604,10 +706,13 @@ public class DanceMain : MonoBehaviour
|
|
|
{
|
|
|
this.m_listMaid[l].EyeToCamera(Maid.EyeMoveType.目だけ向ける, 0f);
|
|
|
}
|
|
|
- NDebug.Assert(this.m_listKuchiPattern.Count == this.m_listMaid.Count, "メイド数と口パクパターン数が異なります。");
|
|
|
+ NDebug.Assert(this.m_listKuchiPattern.Length == this.m_listMaid.Count, "メイド数と口パクパターン数が異なります。");
|
|
|
for (int m = 0; m < this.m_listMaid.Count; m++)
|
|
|
{
|
|
|
- this.m_listMaid[m].StartKuchipakuPattern(0f, this.m_listKuchiPattern[m], true);
|
|
|
+ if (!string.IsNullOrEmpty(this.m_listKuchiPattern[m]))
|
|
|
+ {
|
|
|
+ this.m_listMaid[m].StartKuchipakuPattern(0f, this.m_listKuchiPattern[m], true);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
this.m_eMode = DanceMain.Mode.LoadChara;
|
|
@@ -630,16 +735,42 @@ public class DanceMain : MonoBehaviour
|
|
|
}
|
|
|
int num2 = num - 1;
|
|
|
Maid maid = GameMain.Instance.CharacterMgr.GetMaid(num2);
|
|
|
- string name = maid.CrossFade(this.m_listAnimName[num2] + ".anm", false, false, false, 0f, 1f);
|
|
|
- Animation component = maid.body0.m_Bones.GetComponent<Animation>();
|
|
|
- component.Stop();
|
|
|
- amanimationTrack.obj = maid.body0.m_Bones;
|
|
|
- NDebug.Assert(amanimationTrack.cache.Count == 1, "キャラアニメーショントラックにはアクションを一つしか使えません。(開始と終了キーひとつのみ)");
|
|
|
- foreach (AMAction amaction5 in amanimationTrack.cache)
|
|
|
+ IEnumerator enumerator5 = Enum.GetValues(typeof(Maid.AutoTwist)).GetEnumerator();
|
|
|
+ try
|
|
|
+ {
|
|
|
+ while (enumerator5.MoveNext())
|
|
|
+ {
|
|
|
+ object obj = enumerator5.Current;
|
|
|
+ maid.SetAutoTwist((Maid.AutoTwist)obj, true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ finally
|
|
|
+ {
|
|
|
+ IDisposable disposable;
|
|
|
+ if ((disposable = (enumerator5 as IDisposable)) != null)
|
|
|
+ {
|
|
|
+ disposable.Dispose();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrEmpty(this.m_listAnimName[num2]))
|
|
|
+ {
|
|
|
+ string name = maid.CrossFade(this.m_listAnimName[num2] + ".anm", false, false, false, 0f, 1f);
|
|
|
+ Animation component = maid.body0.m_Bones.GetComponent<Animation>();
|
|
|
+ component.Stop();
|
|
|
+ amanimationTrack.obj = maid.body0.m_Bones;
|
|
|
+ foreach (AMAction amaction5 in amanimationTrack.cache)
|
|
|
+ {
|
|
|
+ AMAnimationAction amanimationAction = (AMAnimationAction)amaction5;
|
|
|
+ amanimationAction.amClip = component.GetClip(name);
|
|
|
+ amanimationAction.obj = maid.body0.m_Bones;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
- AMAnimationAction amanimationAction = (AMAnimationAction)amaction5;
|
|
|
- amanimationAction.amClip = component.GetClip(name);
|
|
|
- amanimationAction.obj = maid.body0.m_Bones;
|
|
|
+ this.m_focePauseAnim.Add(new DanceMain.AnimTime
|
|
|
+ {
|
|
|
+ anim = maid.body0.m_Bones.GetComponent<Animation>()
|
|
|
+ });
|
|
|
}
|
|
|
if (this.UseFloorHitY)
|
|
|
{
|
|
@@ -662,9 +793,79 @@ public class DanceMain : MonoBehaviour
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- for (int num4 = 0; num4 < this.m_listDebugObj.Count; num4++)
|
|
|
+ if (this.m_MoveToDummyCharaPos != null)
|
|
|
+ {
|
|
|
+ NDebug.Assert(this.m_MoveToDummyCharaPos.Length <= this.m_listDummyAnimChara.Count<GameObject>(), "MoveToDummyCharaPos は listDummyAnimChara の数以下である必要があります。");
|
|
|
+ for (int num4 = 0; num4 < this.m_MoveToDummyCharaPos.Length; num4++)
|
|
|
+ {
|
|
|
+ if (this.m_MoveToDummyCharaPos[num4])
|
|
|
+ {
|
|
|
+ Vector3 position = this.m_listDummyAnimChara[num4].transform.position;
|
|
|
+ Maid maid3 = GameMain.Instance.CharacterMgr.GetMaid(num4);
|
|
|
+ if (maid3 != null)
|
|
|
+ {
|
|
|
+ maid3.SetPos(position);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.m_LayerChangeToDummyChara != null)
|
|
|
{
|
|
|
- UnityEngine.Object.DestroyImmediate(this.m_listDebugObj[num4]);
|
|
|
+ NDebug.Assert(this.m_LayerChangeToDummyChara.Length <= this.m_listDummyAnimChara.Count<GameObject>(), "LayerChangeToDummyChara は listDummyAnimChara の数以下である必要があります。");
|
|
|
+ for (int num5 = 0; num5 < this.m_LayerChangeToDummyChara.Length; num5++)
|
|
|
+ {
|
|
|
+ if (this.m_LayerChangeToDummyChara[num5])
|
|
|
+ {
|
|
|
+ int layer = this.m_listDummyAnimChara[num5].layer;
|
|
|
+ Maid maid4 = GameMain.Instance.CharacterMgr.GetMaid(num5);
|
|
|
+ if (maid4 != null)
|
|
|
+ {
|
|
|
+ Transform[] componentsInChildren = maid4.gameObject.GetComponentsInChildren<Transform>(true);
|
|
|
+ foreach (Transform transform3 in componentsInChildren)
|
|
|
+ {
|
|
|
+ transform3.gameObject.layer = layer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.m_EyeTarget != null)
|
|
|
+ {
|
|
|
+ NDebug.Assert(this.m_EyeTarget.Length <= this.m_listDummyAnimChara.Count<GameObject>(), "EyeTarget は listDummyAnimChara の数以下である必要があります。");
|
|
|
+ for (int num7 = 0; num7 < this.m_EyeTarget.Length; num7++)
|
|
|
+ {
|
|
|
+ if (this.m_EyeTarget[num7] != null)
|
|
|
+ {
|
|
|
+ Maid maid5 = GameMain.Instance.CharacterMgr.GetMaid(num7);
|
|
|
+ if (maid5 != null)
|
|
|
+ {
|
|
|
+ maid5.EyeToCamera(Maid.EyeMoveType.目だけ向ける, 0f);
|
|
|
+ maid5.body0.trsLookTarget = this.m_EyeTarget[num7].transform;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.m_MotionCacheEnable != null)
|
|
|
+ {
|
|
|
+ NDebug.Assert(this.m_MotionCacheEnable.Length <= this.m_listDummyAnimChara.Count<GameObject>(), "MotionCacheEnable は listDummyAnimChara の数以下である必要があります。");
|
|
|
+ for (int num8 = 0; num8 < this.m_MotionCacheEnable.Length; num8++)
|
|
|
+ {
|
|
|
+ if (this.m_MotionCacheEnable[num8])
|
|
|
+ {
|
|
|
+ Maid maid6 = GameMain.Instance.CharacterMgr.GetMaid(num8);
|
|
|
+ if (maid6 != null)
|
|
|
+ {
|
|
|
+ for (int num9 = 0; num9 < this.m_MotionCacheFileName.Length; num9++)
|
|
|
+ {
|
|
|
+ maid6.CacheAnime(this.m_MotionCacheFileName[num9], false, false);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (int num10 = 0; num10 < this.m_listDebugObj.Count; num10++)
|
|
|
+ {
|
|
|
+ UnityEngine.Object.DestroyImmediate(this.m_listDebugObj[num10]);
|
|
|
}
|
|
|
this.m_listDebugObj.Clear();
|
|
|
}
|
|
@@ -688,26 +889,69 @@ public class DanceMain : MonoBehaviour
|
|
|
}
|
|
|
else if (this.m_eMode == DanceMain.Mode.Exec)
|
|
|
{
|
|
|
- if (!RhythmAction_Mgr.Instance.IsPause)
|
|
|
+ bool isPause = RhythmAction_Mgr.Instance.IsPause;
|
|
|
+ if (!isPause)
|
|
|
{
|
|
|
- float num5 = RhythmAction_Mgr.Instance.DanceDeltaTime;
|
|
|
+ float num11 = RhythmAction_Mgr.Instance.DanceDeltaTime;
|
|
|
if (this.m_audioNew != null && this.m_audioNew.isPlaying)
|
|
|
{
|
|
|
float time = this.m_audioNew.time;
|
|
|
- for (int num6 = 0; num6 < this.m_listMaid.Count; num6++)
|
|
|
+ for (int num12 = 0; num12 < this.m_listMaid.Count; num12++)
|
|
|
{
|
|
|
- this.m_listMaid[num6].FoceKuchipakuUpdate(time);
|
|
|
+ this.m_listMaid[num12].FoceKuchipakuUpdate(time);
|
|
|
}
|
|
|
if (this.m_bAudioFirst)
|
|
|
{
|
|
|
- float num7 = time;
|
|
|
- num5 = Time.realtimeSinceStartup - this.m_fTakeStartRealTime;
|
|
|
+ float num13 = time;
|
|
|
+ num11 = Time.realtimeSinceStartup - this.m_fTakeStartRealTime;
|
|
|
this.m_bAudioFirst = false;
|
|
|
- this.m_fOffsetTime = num7 - num5;
|
|
|
+ this.m_fOffsetTime = num13 - num11;
|
|
|
RhythmAction_Mgr.Instance.RhythmGame_Start();
|
|
|
}
|
|
|
}
|
|
|
- this.m_fNowRealTime += num5;
|
|
|
+ this.m_fNowRealTime += num11;
|
|
|
+ }
|
|
|
+ if (isPause != this.m_pauseBack)
|
|
|
+ {
|
|
|
+ foreach (DanceMain.AnimTime animTime in this.m_focePauseAnim)
|
|
|
+ {
|
|
|
+ if (isPause)
|
|
|
+ {
|
|
|
+ IEnumerator enumerator8 = animTime.anim.GetEnumerator();
|
|
|
+ try
|
|
|
+ {
|
|
|
+ while (enumerator8.MoveNext())
|
|
|
+ {
|
|
|
+ object obj2 = enumerator8.Current;
|
|
|
+ AnimationState animationState = (AnimationState)obj2;
|
|
|
+ animTime.stateTimeList.Add(new DanceMain.AnimTime.StateTime
|
|
|
+ {
|
|
|
+ state = animationState,
|
|
|
+ time = animationState.time
|
|
|
+ });
|
|
|
+ animationState.speed = 0f;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ finally
|
|
|
+ {
|
|
|
+ IDisposable disposable2;
|
|
|
+ if ((disposable2 = (enumerator8 as IDisposable)) != null)
|
|
|
+ {
|
|
|
+ disposable2.Dispose();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ foreach (DanceMain.AnimTime.StateTime stateTime in animTime.stateTimeList)
|
|
|
+ {
|
|
|
+ stateTime.state.time = stateTime.time;
|
|
|
+ stateTime.state.speed = 1f;
|
|
|
+ }
|
|
|
+ animTime.stateTimeList.Clear();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.m_pauseBack = isPause;
|
|
|
}
|
|
|
if (this.IsForceDanceEnd || this.m_AnimatorData.takeName == null || this.IsDanceSkip || (DanceMain.KaraokeMode && Input.GetKeyDown(KeyCode.Return)))
|
|
|
{
|
|
@@ -761,7 +1005,7 @@ public class DanceMain : MonoBehaviour
|
|
|
|
|
|
public List<string> m_listKuchiPakuFile = new List<string>();
|
|
|
|
|
|
- private List<string> m_listKuchiPattern = new List<string>();
|
|
|
+ private string[] m_listKuchiPattern;
|
|
|
|
|
|
private List<Maid> m_listMaid = new List<Maid>();
|
|
|
|
|
@@ -823,6 +1067,44 @@ public class DanceMain : MonoBehaviour
|
|
|
[Header("AdjustScript読み込みに要する時間")]
|
|
|
private float m_LoadScriptTime = 3f;
|
|
|
|
|
|
+ [SerializeField]
|
|
|
+ [Header("初期化時にダミーキャラの位置にメイドを移動させるメイド番号スイッチ")]
|
|
|
+ public bool[] m_MoveToDummyCharaPos;
|
|
|
+
|
|
|
+ [SerializeField]
|
|
|
+ [Header("初期化時にダミーキャラのLayerをメイドに設定させるメイド番号スイッチ")]
|
|
|
+ public bool[] m_LayerChangeToDummyChara;
|
|
|
+
|
|
|
+ public Light[] m_OffScreenLight;
|
|
|
+
|
|
|
+ [SerializeField]
|
|
|
+ [Header("初期化時にメイドの視線に設定するオブジェクト対メイド番号")]
|
|
|
+ public GameObject[] m_EyeTarget;
|
|
|
+
|
|
|
+ [SerializeField]
|
|
|
+ [Header("特定メイド番号からダミーメイドへの容姿のコピー(Elementが元メイド番号/値が先メイド番号")]
|
|
|
+ public int[] m_PresetCopyToDummyChara;
|
|
|
+
|
|
|
+ [SerializeField]
|
|
|
+ [Header("途中でモーションを変えるメイド番号のファイル名リスト")]
|
|
|
+ public bool[] m_MotionCacheEnable;
|
|
|
+
|
|
|
+ [SerializeField]
|
|
|
+ [Header("途中でモーションを変える場合のファイル名リスト")]
|
|
|
+ public string[] m_MotionCacheFileName;
|
|
|
+
|
|
|
+ [SerializeField]
|
|
|
+ [Header("途中で口パクを変える場合のファイル名リスト")]
|
|
|
+ public string[] m_KuchipakuCacheFileName;
|
|
|
+
|
|
|
+ private Dictionary<string, string> m_KuchiPatternCache = new Dictionary<string, string>();
|
|
|
+
|
|
|
+ public float[] m_KuchipakuAudioStartTimeAtMaid;
|
|
|
+
|
|
|
+ private List<DanceMain.AnimTime> m_focePauseAnim = new List<DanceMain.AnimTime>();
|
|
|
+
|
|
|
+ private bool m_pauseBack;
|
|
|
+
|
|
|
private bool m_bFinished;
|
|
|
|
|
|
private float m_fNowRealTime;
|
|
@@ -842,4 +1124,18 @@ public class DanceMain : MonoBehaviour
|
|
|
Finish,
|
|
|
LoadScript
|
|
|
}
|
|
|
+
|
|
|
+ private class AnimTime
|
|
|
+ {
|
|
|
+ public Animation anim;
|
|
|
+
|
|
|
+ public List<DanceMain.AnimTime.StateTime> stateTimeList = new List<DanceMain.AnimTime.StateTime>();
|
|
|
+
|
|
|
+ public class StateTime
|
|
|
+ {
|
|
|
+ public AnimationState state;
|
|
|
+
|
|
|
+ public float time;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|