Commit 761f5c20 authored by SherryChaos's avatar SherryChaos

reset bg phases when quit duel

parent 238ed70b
...@@ -22,6 +22,7 @@ using YgomSystem.ElementSystem; ...@@ -22,6 +22,7 @@ using YgomSystem.ElementSystem;
using YgomSystem.Timeline; using YgomSystem.Timeline;
using static MDPro3.Servant.OcgCore; using static MDPro3.Servant.OcgCore;
using static YgomGame.Bg.BgEffectSettingInner; using static YgomGame.Bg.BgEffectSettingInner;
using static YgomGame.Bg.BgUnit;
namespace MDPro3.Duel namespace MDPro3.Duel
{ {
...@@ -939,8 +940,7 @@ namespace MDPro3.Duel ...@@ -939,8 +940,7 @@ namespace MDPro3.Duel
mate.parent = anchor; mate.parent = anchor;
mate.transform.SetParent(anchor, false); mate.transform.SetParent(anchor, false);
mate.transform.localPosition = Vector3.zero; mate.transform.SetLocalPositionAndRotation(Vector3.zero, Quaternion.identity);
mate.transform.localRotation = Quaternion.identity;
} }
private static int GetRayeEngageMateId(PremiumMateState state) private static int GetRayeEngageMateId(PremiumMateState state)
...@@ -993,7 +993,6 @@ namespace MDPro3.Duel ...@@ -993,7 +993,6 @@ namespace MDPro3.Duel
{ {
if (state == null) if (state == null)
return; return;
foreach (var pair in state.Forms) foreach (var pair in state.Forms)
{ {
var mate = pair.Value; var mate = pair.Value;
...@@ -1096,7 +1095,6 @@ namespace MDPro3.Duel ...@@ -1096,7 +1095,6 @@ namespace MDPro3.Duel
{ {
if (mate == null || triggerPriority == null || triggerPriority.Count == 0) if (mate == null || triggerPriority == null || triggerPriority.Count == 0)
return false; return false;
var checkedSet = new HashSet<string>(StringComparer.OrdinalIgnoreCase); var checkedSet = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
for (var i = 0; i < triggerPriority.Count; i++) for (var i = 0; i < triggerPriority.Count; i++)
{ {
...@@ -1253,6 +1251,7 @@ namespace MDPro3.Duel ...@@ -1253,6 +1251,7 @@ namespace MDPro3.Duel
? state.SwapEffect.ToSubNextTriggerPriority ? state.SwapEffect.ToSubNextTriggerPriority
: state.SwapEffect.ToBaseNextTriggerPriority); : state.SwapEffect.ToBaseNextTriggerPriority);
IReadOnlyList<string> effectiveNextTriggerPriority = nextTriggerPriority; IReadOnlyList<string> effectiveNextTriggerPriority = nextTriggerPriority;
if (state.SwapEffect.UseChangeMotion && currentMate != null && playChangeOnCurrentMate if (state.SwapEffect.UseChangeMotion && currentMate != null && playChangeOnCurrentMate
&& !MateHasAnyTransitionCandidate(currentMate, currentTriggerPriority)) && !MateHasAnyTransitionCandidate(currentMate, currentTriggerPriority))
playChangeOnCurrentMate = false; playChangeOnCurrentMate = false;
...@@ -2273,6 +2272,8 @@ namespace MDPro3.Duel ...@@ -2273,6 +2272,8 @@ namespace MDPro3.Duel
foreach (var go in allGameObjects) foreach (var go in allGameObjects)
UnityEngine.Object.Destroy(go); UnityEngine.Object.Destroy(go);
allGameObjects.Clear(); allGameObjects.Clear();
bgPhase0 = 0;
bgPhase1 = 0;
ResetPremiumMateStates(); ResetPremiumMateStates();
mate0 = null; mate0 = null;
mate1 = null; mate1 = null;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
QualitySettings: QualitySettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 5 serializedVersion: 5
m_CurrentQuality: 0 m_CurrentQuality: 6
m_QualitySettings: m_QualitySettings:
- serializedVersion: 4 - serializedVersion: 4
name: Very Low name: Very Low
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment