Commit d9602e29 authored by SherryChaos's avatar SherryChaos

Card Effect: Droll & Lock Bird

parent a8e8d2dc
......@@ -20690,7 +20690,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 2453243968722375538}
m_Direction: 0
m_MinValue: 1
m_MaxValue: 50
m_MaxValue: 5
m_WholeNumbers: 0
m_Value: 2
m_OnValueChanged:
......@@ -76634,10 +76634,10 @@ RectTransform:
m_Children: []
m_Father: {fileID: 1093411532816603320}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 280.5, y: -32.5}
m_SizeDelta: {x: 220, y: 65}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 65}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &8785525400512752497
MonoBehaviour:
......@@ -105631,10 +105631,10 @@ RectTransform:
m_Children: []
m_Father: {fileID: 1093411532816603320}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 7.5, y: -32.5}
m_SizeDelta: {x: 48, y: 48}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 48}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &619789329790613390
CanvasRenderer:
......@@ -131371,10 +131371,10 @@ RectTransform:
m_Children: []
m_Father: {fileID: 7906247530264476602}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 280.5, y: -32.5}
m_SizeDelta: {x: 220, y: 65}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 65}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &7904579191069854560
MonoBehaviour:
......@@ -172909,10 +172909,10 @@ RectTransform:
m_Children: []
m_Father: {fileID: 7906247530264476602}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 7.5, y: -32.5}
m_SizeDelta: {x: 48, y: 48}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 48}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &4874165024367689755
CanvasRenderer:
......@@ -7991,7 +7991,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 599.99994, y: 0}
m_AnchoredPosition: {x: 600.0001, y: 0}
m_SizeDelta: {x: 600, y: 0}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &1850716665
......
......@@ -1794,6 +1794,26 @@ namespace MDPro3.Duel
}
return;
}
// 小丑与锁鸟
else if (code == 94145021)
{
AudioManager.PlaySE("SE_EV_EF09279_v1");
effect = GetCardEffectPrefab("Ef09279_Act01");
var manager = effect.GetComponent<ElementObjectManager>();
if (card.p.InMyControl())
{
UnityEngine.Object.Destroy(manager.GetElement("MainDeck"));
DuelEffectUtil.SetDeckModelAppearance(manager.GetElement<ElementObjectManager>("EnMainDeck")
, Core.GetLocationCardCount(CardLocation.Deck, 1), opDeck);
}
else
{
UnityEngine.Object.Destroy(manager.GetElement("EnMainDeck"));
DuelEffectUtil.SetDeckModelAppearance(manager.GetElement<ElementObjectManager>("MainDeck")
, Core.GetLocationCardCount(CardLocation.Deck, 0), myDeck);
}
}
var director = effect.GetComponent<PlayableDirector>();
await director.WaitAsync();
......
......@@ -1294,9 +1294,9 @@ namespace MDPro3
await CutinViewer.Play(data.Id, (int)p.controller);
}
if (data.IsHighLevel())
await SequenceStrongSummon(sequence, position, rotation, 0).WaitAsync();
await SequenceStrongSummon(sequence, position, rotation, 0, timePassed).WaitAsync();
else
await SequenceNormalSummon(sequence, position, rotation, 0).WaitAsync();
await SequenceNormalSummon(sequence, position, rotation, 0, timePassed).WaitAsync();
return;
}
}
......@@ -1312,9 +1312,9 @@ namespace MDPro3
if (cutin)
await CutinViewer.Play(data.Id, (int)p.controller);
if (data.IsHighLevel())
await SequenceStrongSummon(sequence, position, rotation, 0).WaitAsync();
await SequenceStrongSummon(sequence, position, rotation, 0, timePassed).WaitAsync();
else
await SequenceNormalSummon(sequence, position, rotation, 0).WaitAsync();
await SequenceNormalSummon(sequence, position, rotation, 0, timePassed).WaitAsync();
return;
}
......@@ -1475,7 +1475,7 @@ namespace MDPro3
return u * u * p0 + 2 * u * t * p1 + t * t * p2;
}
public Sequence StartCardSequence(Vector3 fromPosition, Vector3 fromRotation, float waitTime = 0f)
public Sequence StartCardSequence(Vector3 fromPosition, Vector3 fromRotation, float interval = 0f)
{
if (model == null)
return null;
......@@ -1486,13 +1486,13 @@ namespace MDPro3
var position = GetCardPosition(p);
var rotaion = GetCardRotation(p);
var sequence = DOTween.Sequence();
if(data.IsHighLevel())
return SequenceStrongSummon(sequence, position, rotaion, waitTime);
if (data.IsHighLevel())
return SequenceStrongSummon(sequence, position, rotaion, interval, 0f);
else
return SequenceNormalSummon(sequence, position, rotaion, waitTime);
return SequenceNormalSummon(sequence, position, rotaion, interval, 0f);
}
private Sequence SequenceStrongSummon(Sequence sequence, Vector3 position, Vector3 angle, float interval)
private Sequence SequenceStrongSummon(Sequence sequence, Vector3 position, Vector3 angle, float interval, float timePassed)
{
var cardPlane = manager.GetElement<Transform>("CardPlane");
var pivot = manager.GetElement<Transform>("Pivot");
......@@ -1516,14 +1516,14 @@ namespace MDPro3
sequence.Join(pivot.DOLocalMove(Vector3.zero, 0.26f).SetEase(Ease.InOutSine));
sequence.Join(pivot.DOLocalRotate(Vector3.zero, 0.26f).SetEase(Ease.InOutSine));
sequence.Insert(interval + 0.26f, pivot.DOLocalMoveY(10, 0.5f).SetEase(Ease.InOutQuart));
sequence.Insert(interval + 0.26f, pivot.DOLocalRotate(new Vector3(-35, 0, 0), 0.5f).SetEase(Ease.InOutQuart));
sequence.Join(offset.DOLocalMove(Vector3.zero, 0.5f).SetEase(Ease.InOutSine));
sequence.Join(offset.DOLocalRotate(Vector3.zero, 0.5f).SetEase(Ease.InOutSine));
sequence.Join(turn.DOLocalRotate(new Vector3(0, (angle.y == 0) || (angle.y == 180) ? 0 : 270, angle.z), 0.3f).SetEase(Ease.InOutSine));
sequence.AppendInterval(0.26f);
sequence.Insert(timePassed + interval + 0.26f, pivot.DOLocalMoveY(10, 0.5f).SetEase(Ease.InOutQuart));
sequence.Insert(timePassed + interval + 0.26f, pivot.DOLocalRotate(new Vector3(-35, 0, 0), 0.5f).SetEase(Ease.InOutQuart));
sequence.Append(pivot.DOLocalRotate(Vector3.zero, 0.14f).SetEase(Ease.InQuart));
sequence.Join(pivot.DOLocalMoveY(0, 0.14f).SetEase(Ease.InQuart));
sequence.Join(manager.transform.DOMove(position, 0.14f).SetEase(Ease.InQuart));
......@@ -1544,7 +1544,7 @@ namespace MDPro3
return sequence;
}
private Sequence SequenceNormalSummon(Sequence sequence, Vector3 position, Vector3 angle, float interval)
private Sequence SequenceNormalSummon(Sequence sequence, Vector3 position, Vector3 angle, float interval, float timePassed)
{
var cardPlane = manager.GetElement<Transform>("CardPlane");
var pivot = manager.GetElement<Transform>("Pivot");
......@@ -1567,14 +1567,13 @@ namespace MDPro3
sequence.Join(pivot.DOLocalMove(Vector3.zero, 0.16f).SetEase(Ease.InOutSine));
sequence.Join(pivot.DOLocalRotate(Vector3.zero, 0.16f).SetEase(Ease.InOutSine));
sequence.Insert(interval + 0.16f, pivot.DOLocalMoveY(5, 0.4f).SetEase(Ease.InOutQuart));
sequence.Insert(interval + 0.16f, pivot.DOLocalRotate(new Vector3(-15, 0, 0), 0.4f).SetEase(Ease.InOutQuart));
sequence.Join(offset.DOLocalMove(Vector3.zero, 0.4f).SetEase(Ease.InOutSine));
sequence.Join(offset.DOLocalRotate(Vector3.zero, 0.4f).SetEase(Ease.InOutSine));
sequence.Join(turn.DOLocalRotate(new Vector3(0, (angle.y == 0) || (angle.y == 180) ? 0 : 270, angle.z), 0.2f).SetEase(Ease.InOutSine));
sequence.AppendInterval(0.16f);
sequence.Insert(timePassed + interval + 0.16f, pivot.DOLocalMoveY(5, 0.4f).SetEase(Ease.InOutQuart));
sequence.Insert(timePassed + interval + 0.16f, pivot.DOLocalRotate(new Vector3(-15, 0, 0), 0.4f).SetEase(Ease.InOutQuart));
sequence.Append(pivot.DOLocalRotate(Vector3.zero, 0.14f).SetEase(Ease.InQuart));
sequence.Join(pivot.DOLocalMoveY(0, 0.14f).SetEase(Ease.InQuart));
......
......@@ -603,10 +603,10 @@ namespace MDPro3
OcgCore.summonCard.UpdateExDeckTop();
var waitTime = 0.5f;
var interval = 0.5f;
if (CutinViewer.HasCutin(code))
waitTime = 1f;
await OcgCore.summonCard.StartCardSequence(position, angle, waitTime).WaitAsync();
interval = 1f;
await OcgCore.summonCard.StartCardSequence(position, angle, interval).WaitAsync();
dummyCard = null;
OcgCore.summonCard = null;
}
......
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