Commit 4e748364 authored by SherryChaos's avatar SherryChaos

Card Effect: Called by the Grave (Alt)

parent e89aa32e
...@@ -1512,6 +1512,8 @@ namespace MDPro3.Duel ...@@ -1512,6 +1512,8 @@ namespace MDPro3.Duel
code = 32807848; code = 32807848;
if (card.GetData().Id == 49238329)//强欲而金满之壶 异画 if (card.GetData().Id == 49238329)//强欲而金满之壶 异画
code = 49238329; code = 49238329;
if (card.GetData().Id == 24224831)//墓穴的指名者 异画
code = 24224831;
var targetFolder = Program.root + "MasterDuel/Card/" + code.ToString(); var targetFolder = Program.root + "MasterDuel/Card/" + code.ToString();
#if UNITY_STANDALONE_WIN && !UNITY_EDITOR #if UNITY_STANDALONE_WIN && !UNITY_EDITOR
...@@ -1599,6 +1601,12 @@ namespace MDPro3.Duel ...@@ -1599,6 +1601,12 @@ namespace MDPro3.Duel
AudioManager.PlaySE("SE_EV_CALLED_GRAVE"); AudioManager.PlaySE("SE_EV_CALLED_GRAVE");
effect = GetCardEffectPrefab(card.p.InMyControl() ? "Ef13619" : "Ef13619Op"); effect = GetCardEffectPrefab(card.p.InMyControl() ? "Ef13619" : "Ef13619Op");
} }
// 墓穴的指名者 异画
else if (code == 24224831)
{
AudioManager.PlaySE(card.p.InMyControl() ? "SE_EV_EF21233_R" : "SE_EV_EF21233_P");
effect = GetCardEffectPrefab(card.p.InMyControl() ? Tools.IsAspectRatioWidescreen() ? "Ef21233_Op" : "Ef21233_Op_4x3" : "Ef21233");
}
// 禁忌的一滴 // 禁忌的一滴
else if (code == 24299458) else if (code == 24299458)
{ {
...@@ -1886,8 +1894,7 @@ namespace MDPro3.Duel ...@@ -1886,8 +1894,7 @@ namespace MDPro3.Duel
} }
var director = effect.GetComponent<PlayableDirector>(); var director = effect.GetComponent<PlayableDirector>();
await director.WaitAsync(); await director.AutoDestroy();
UnityEngine.Object.Destroy(effect);
} }
else else
{ {
......
...@@ -369,5 +369,19 @@ namespace MDPro3 ...@@ -369,5 +369,19 @@ namespace MDPro3
#endregion #endregion
#region Screen
public static float GetScreenAspectRatio()
{
return (float)Screen.width / Screen.height;
}
public static bool IsAspectRatioWidescreen()
{
return GetScreenAspectRatio() >= 1.77f; // 16:9
}
#endregion
} }
} }
\ No newline at end of file
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