Commit 2acf837b authored by 赤子奈落's avatar 赤子奈落

new attack effects

parent bd5ac3de
...@@ -10,6 +10,14 @@ public class CameraControl : MonoBehaviour ...@@ -10,6 +10,14 @@ public class CameraControl : MonoBehaviour
{ {
Instance = this; Instance = this;
} }
public static void ShakeCameraNowBig()
{
Instance.StatShakeCameraDelay(0, true);
}
public static void ShakeCameraNowSmall()
{
Instance.StatShakeCameraDelay(0, false);
}
public static void ShakeCamera(float t, bool big = true) public static void ShakeCamera(float t, bool big = true)
{ {
Instance.StatShakeCameraDelay(t, big); Instance.StatShakeCameraDelay(t, big);
......
...@@ -116,7 +116,6 @@ public class CardAnimation : MonoBehaviour ...@@ -116,7 +116,6 @@ public class CardAnimation : MonoBehaviour
{ {
CloseUpControl cc = transform.Find("mod_simple_quad(Clone)").GetChild(0).GetComponent<CloseUpControl>(); CloseUpControl cc = transform.Find("mod_simple_quad(Clone)").GetChild(0).GetComponent<CloseUpControl>();
cc.FadeOut(0.167f); cc.FadeOut(0.167f);
;
} }
StartCoroutine(DelayActivateQuad(0.75f + 0.167f)); StartCoroutine(DelayActivateQuad(0.75f + 0.167f));
} }
......
...@@ -33,4 +33,12 @@ public class CloseUpControl : MonoBehaviour ...@@ -33,4 +33,12 @@ public class CloseUpControl : MonoBehaviour
{ {
DOTween.To(() => alpha, x => alpha = x, 0f, time); DOTween.To(() => alpha, x => alpha = x, 0f, time);
} }
public void FadeOutIn(float timeWait1, float timeOut, float timeWait2, float timeIn)
{
Sequence quence = DOTween.Sequence();
quence.AppendInterval(timeWait1);
quence.Append(DOTween.To(() => alpha, x => alpha = x, 0f, timeOut));
quence.AppendInterval(timeWait2);
quence.Append(DOTween.To(() => alpha, x => alpha = x, 1f, timeIn));
}
} }
...@@ -206,10 +206,10 @@ public class Shortcuts : MonoBehaviour ...@@ -206,10 +206,10 @@ public class Shortcuts : MonoBehaviour
} }
Time.timeScale = timescale; Time.timeScale = timescale;
if (message != Program.I().ocgcore.currentMessage) //if (message != Program.I().ocgcore.currentMessage)
{ //{
message = Program.I().ocgcore.currentMessage; // message = Program.I().ocgcore.currentMessage;
Debug.Log(message); // Debug.Log(message);
} //}
} }
} }
...@@ -219,7 +219,7 @@ Transform: ...@@ -219,7 +219,7 @@ Transform:
m_LocalScale: {x: 100, y: 1, z: 100} m_LocalScale: {x: 100, y: 1, z: 100}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 12 m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &123417882 --- !u!1 &123417882
GameObject: GameObject:
...@@ -346,7 +346,7 @@ Transform: ...@@ -346,7 +346,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 9 m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &315797831 --- !u!1 &315797831
GameObject: GameObject:
...@@ -655,7 +655,7 @@ Transform: ...@@ -655,7 +655,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 7 m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &408335504 --- !u!1 &408335504
GameObject: GameObject:
...@@ -890,72 +890,6 @@ RectTransform: ...@@ -890,72 +890,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0} m_Pivot: {x: 0, y: 0}
--- !u!1 &819399764
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 819399767}
- component: {fileID: 819399766}
- component: {fileID: 819399765}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &819399765
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 819399764}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &819399766
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 819399764}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &819399767
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 819399764}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1216886575 --- !u!1 &1216886575
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -986,7 +920,7 @@ Transform: ...@@ -986,7 +920,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 10 m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!320 &1216886577 --- !u!320 &1216886577
PlayableDirector: PlayableDirector:
...@@ -1229,7 +1163,7 @@ Transform: ...@@ -1229,7 +1163,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 11 m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1351326601 --- !u!1 &1351326601
GameObject: GameObject:
...@@ -1357,7 +1291,7 @@ Transform: ...@@ -1357,7 +1291,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 8 m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1351326604 --- !u!114 &1351326604
MonoBehaviour: MonoBehaviour:
...@@ -1487,7 +1421,7 @@ Transform: ...@@ -1487,7 +1421,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 13 m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1897184762 --- !u!1 &1897184762
GameObject: GameObject:
......
...@@ -9,9 +9,9 @@ using UnityEngine; ...@@ -9,9 +9,9 @@ using UnityEngine;
public class TestLoad : MonoBehaviour public class TestLoad : MonoBehaviour
{ {
void Start() void OnEnable()
{ {
var a1 = ABLoader.LoadABFolder("effects/other"); var a1 = ABLoader.LoadABFolder("effects/hit");
//a1.transform.DOMoveZ(10, 1);
} }
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -70,6 +70,8 @@ public class gameCard : OCGobject ...@@ -70,6 +70,8 @@ public class gameCard : OCGobject
public bool cookie_cared = false; public bool cookie_cared = false;
public bool inAnimation = false;
public int counterCANcount = 0; public int counterCANcount = 0;
public int counterSELcount = 0; public int counterSELcount = 0;
...@@ -900,6 +902,10 @@ public class gameCard : OCGobject ...@@ -900,6 +902,10 @@ public class gameCard : OCGobject
public void UA_flush_all_gived_witn_lock(bool rush, float voiceTime = 0) public void UA_flush_all_gived_witn_lock(bool rush, float voiceTime = 0)
{ {
if (gameObject.GetComponent<TraceCard>().trace)
{
Debug.Log(get_data().Name + "--动了");
}
if (Vector3.Distance(gived_position, accurate_position) > 0.001f || if (Vector3.Distance(gived_position, accurate_position) > 0.001f ||
Vector3.Distance(gived_rotation, accurate_rotation) > 0.001f) Vector3.Distance(gived_rotation, accurate_rotation) > 0.001f)
{ {
...@@ -1313,6 +1319,8 @@ public class gameCard : OCGobject ...@@ -1313,6 +1319,8 @@ public class gameCard : OCGobject
public void TweenTo(Vector3 pos, Vector3 rot, float delay = 0f, float newtime = 0f, bool exciting = false, iTween.EaseType easeType = iTween.EaseType.easeOutQuad) //mark 卡片移动功能 public void TweenTo(Vector3 pos, Vector3 rot, float delay = 0f, float newtime = 0f, bool exciting = false, iTween.EaseType easeType = iTween.EaseType.easeOutQuad) //mark 卡片移动功能
{ {
if (inAnimation)
return;
var time = 0.1f; var time = 0.1f;
time += Vector3.Distance(pos, gameObject.transform.position) * 0.2f / 30f; time += Vector3.Distance(pos, gameObject.transform.position) * 0.2f / 30f;
if (time < 0.1f) time = 0.1f; if (time < 0.1f) time = 0.1f;
......
...@@ -201,6 +201,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -201,6 +201,7 @@ public class Ocgcore : ServantWithCardDescription
public static float landDelay = 0.1f; public static float landDelay = 0.1f;
private bool hasPlayedDamageSE;
public float getScreenCenter() public float getScreenCenter()
{ {
return Screen.width / 2f;//(Screen.width + Program.I().cardDescription.width - gameInfo.width) / 2f;//mark 屏幕中心 return Screen.width / 2f;//(Screen.width + Program.I().cardDescription.width - gameInfo.width) / 2f;//mark 屏幕中心
...@@ -4100,7 +4101,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4100,7 +4101,7 @@ public class Ocgcore : ServantWithCardDescription
if (cards[i].p.controller == player) if (cards[i].p.controller == player)
if (i % 2 == 0) if (i % 2 == 0)
cards[i].animation_shake_to(1.2f); cards[i].animation_shake_to(1.2f);
Sleep(30); //Sleep(30);
break; break;
case GameMessage.ShuffleHand: case GameMessage.ShuffleHand:
realize(); realize();
...@@ -5081,14 +5082,19 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5081,14 +5082,19 @@ public class Ocgcore : ServantWithCardDescription
gameInfo.realize(); gameInfo.realize();
player = localPlayer(r.ReadByte()); player = localPlayer(r.ReadByte());
val = r.ReadInt32(); val = r.ReadInt32();
if (hasPlayedDamageSE == false)
UIHelper.playSound("SE_DUEL/SE_COST_DAMAGE", 1f); UIHelper.playSound("SE_DUEL/SE_COST_DAMAGE", 1f);
if(val >= 2000) else
hasPlayedDamageSE = false;
if (val >= 2000)
VoiceHandler.PlayFixedLine((uint)player, "GetHugeDamage"); VoiceHandler.PlayFixedLine((uint)player, "GetHugeDamage");
else else
VoiceHandler.PlayFixedLine((uint)player, "GetDamage"); VoiceHandler.PlayFixedLine((uint)player, "GetDamage");
gameField.animation_show_lp_num(player, false, val); gameField.animation_show_lp_num(player, false, val);
if (Program.I().setting.setting.Vdamage.value) gameField.animation_screen_blood(player, val); if (Program.I().setting.setting.Vdamage.value) gameField.animation_screen_blood(player, val);
Sleep(60); Sleep(12);
break; break;
case GameMessage.Recover: case GameMessage.Recover:
gameInfo.realize(); gameInfo.realize();
...@@ -5307,43 +5313,247 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5307,43 +5313,247 @@ public class Ocgcore : ServantWithCardDescription
} }
r.ReadByte(); r.ReadByte();
UIHelper.playSound("explode", 0.5f); //UIHelper.playSound("explode", 0.5f);
var amount = (int) (Mathf.Clamp(attackCard.get_data().Attack, 0, 3500) * 0.8f); //var amount = (int) (Mathf.Clamp(attackCard.get_data().Attack, 0, 3500) * 0.8f);
iTween.ShakePosition(Program.I().main_camera.gameObject, iTween.Hash(//mark 镜头摇晃 //iTween.ShakePosition(Program.I().main_camera.gameObject, iTween.Hash(//mark 镜头摇晃
"x", amount / 1500f, // "x", amount / 1500f,
"y", amount / 1500f, // "y", amount / 1500f,
"z", amount / 1500f, // "z", amount / 1500f,
"time", amount / 2500f // "time", amount / 2500f
)); //));
VectorAttackCard = get_point_worldposition(gpsAttacker); VectorAttackCard = get_point_worldposition(gpsAttacker);
if (attackedCard == null || gpsAttacked.location == 0) if (attackedCard == null || gpsAttacked.location == 0)
{ {
var attacker_bool_me = gpsAttacker.controller == 0; var attacker_bool_me = gpsAttacker.controller == 0;
if (attacker_bool_me) if (attacker_bool_me)
VectorAttackTarget = new Vector3(0, 0, 25);//mark 玩家被攻击位置 VectorAttackTarget = new Vector3(0, 5, 25);//mark 玩家被攻击位置
else else
VectorAttackTarget = new Vector3(0, 0, -25); VectorAttackTarget = new Vector3(0, 5, -25);
} }
else else
{ {
VectorAttackTarget = get_point_worldposition(gpsAttacked); VectorAttackTarget = get_point_worldposition(gpsAttacked);
//VectorAttackTarget += (VectorAttackTarget - VectorAttackCard) * 0.3f;
} }
if (attackedCard != null && gpsAttacked.location != 0 && //if (attackedCard != null && gpsAttacked.location != 0 &&
(attackedCard.p.position & (uint) CardPosition.FaceUpAttack) > 0) // (attackedCard.p.position & (uint) CardPosition.FaceUpAttack) > 0)
//{
// if (attackCard.get_data().Attack >= attackedCard.get_data().Attack)
// animation_battle(VectorAttackCard, VectorAttackTarget, attackCard);
// else
// animation_battle(VectorAttackTarget, VectorAttackCard, attackedCard);
//}
//else
//{
// animation_battle(VectorAttackCard, VectorAttackTarget, attackCard);
//}
//Sleep(40);
GameObject fx = null;
string hit = "无";
string sound1 = "无";
string sound2 = "无";
if (attackCard.get_data().Attack >= 2000)
{ {
if (attackCard.get_data().Attack >= attackedCard.get_data().Attack) if ((attackCard.get_data().Attribute & (uint)CardAttribute.Dark) > 0)
animation_battle(VectorAttackCard, VectorAttackTarget, attackCard); {
fx = ABLoader.LoadAB("effects/attack/fxp_atkdak_s2_001");
hit = "effects/hit/fxp_hitdak_s2_001";
sound1 = "SE_DUEL/SE_ATTACK_A_DARK_SPECIAL_01";
sound2 = "SE_DUEL/SE_ATTACK_A_DARK_SPECIAL_02";
}
else if ((attackCard.get_data().Attribute & (uint)CardAttribute.Divine) > 0)
{
fx = ABLoader.LoadAB("effects/attack/fxp_atklit_s2_001");
hit = "effects/hit/fxp_hitlit_s2_001";
sound1 = "SE_DUEL/SE_ATTACK_A_DIVINE_SPECIAL_01";
sound2 = "SE_DUEL/SE_ATTACK_A_DIVINE_SPECIAL_02";
}
else if ((attackCard.get_data().Attribute & (uint)CardAttribute.Earth) > 0)
{
fx = ABLoader.LoadAB("effects/attack/fxp_atkeah_s2_001");
hit = "effects/hit/fxp_hiteah_s2_001";
sound1 = "SE_DUEL/SE_ATTACK_A_EARTH_SPECIAL_01";
sound2 = "SE_DUEL/SE_ATTACK_A_EARTH_SPECIAL_02";
}
else if ((attackCard.get_data().Attribute & (uint)CardAttribute.Fire) > 0)
{
fx = ABLoader.LoadAB("effects/attack/fxp_atkfie_s2_001");
hit = "effects/hit/fxp_hitfie_s2_001";
sound1 = "SE_DUEL/SE_ATTACK_A_FIRE_SPECIAL_01";
sound2 = "SE_DUEL/SE_ATTACK_A_FIRE_SPECIAL_02";
}
else if ((attackCard.get_data().Attribute & (uint)CardAttribute.Light) > 0)
{
fx = ABLoader.LoadAB("effects/attack/fxp_atklit_s2_001");
hit = "effects/hit/fxp_hitlit_s2_001";
sound1 = "SE_DUEL/SE_ATTACK_A_LIGHT_SPECIAL_01";
sound2 = "SE_DUEL/SE_ATTACK_A_LIGHT_SPECIAL_02";
}
else if ((attackCard.get_data().Attribute & (uint)CardAttribute.Water) > 0)
{
fx = ABLoader.LoadAB("effects/attack/fxp_atkwtr_s2_001");
hit = "effects/hit/fxp_hitwtr_s2_001";
sound1 = "SE_DUEL/SE_ATTACK_A_WIND_SPECIAL_01";
sound2 = "SE_DUEL/SE_ATTACK_A_WIND_SPECIAL_02";
}
else if ((attackCard.get_data().Attribute & (uint)CardAttribute.Wind) > 0)
{
fx = ABLoader.LoadAB("effects/attack/fxp_atkwid_s2_001");
hit = "effects/hit/fxp_hitwid_s2_001";
sound1 = "SE_DUEL/SE_ATTACK_A_DARK_SPECIAL_01";
sound2 = "SE_DUEL/SE_ATTACK_A_DARK_SPECIAL_02";
}
}
else else
animation_battle(VectorAttackTarget, VectorAttackCard, attackedCard); {
if ((attackCard.get_data().Attribute & (uint)CardAttribute.Dark) > 0)
{
fx = ABLoader.LoadAB("effects/attack/fxp_atkdak_s1_001");
hit = "effects/hit/fxp_hitdak_s1_001";
sound1 = "SE_DUEL/SE_ATTACK_A_DARK_DEFAULT_01";
sound2 = "SE_DUEL/SE_ATTACK_A_DARK_DEFAULT_02";
} }
else if ((attackCard.get_data().Attribute & (uint)CardAttribute.Divine) > 0)
{
fx = ABLoader.LoadAB("effects/attack/fxp_atklit_s1_001");
hit = "effects/hit/fxp_hitlit_s1_001";
sound1 = "SE_DUEL/SE_ATTACK_A_DIVINE_DEFAULT_01";
sound2 = "SE_DUEL/SE_ATTACK_A_DIVINE_DEFAULT_02";
}
else if ((attackCard.get_data().Attribute & (uint)CardAttribute.Earth) > 0)
{
fx = ABLoader.LoadAB("effects/attack/fxp_atkeah_s1_001");
hit = "effects/hit/fxp_hiteah_s1_001";
sound1 = "SE_DUEL/SE_ATTACK_A_EARTH_DEFAULT_01";
sound2 = "SE_DUEL/SE_ATTACK_A_EARTH_DEFAULT_02";
}
else if ((attackCard.get_data().Attribute & (uint)CardAttribute.Fire) > 0)
{
fx = ABLoader.LoadAB("effects/attack/fxp_atkfie_s1_001");
hit = "effects/hit/fxp_hitfie_s1_001";
sound1 = "SE_DUEL/SE_ATTACK_A_FIRE_DEFAULT_01";
sound2 = "SE_DUEL/SE_ATTACK_A_FIRE_DEFAULT_02";
}
else if ((attackCard.get_data().Attribute & (uint)CardAttribute.Light) > 0)
{
fx = ABLoader.LoadAB("effects/attack/fxp_atklit_s1_001");
hit = "effects/hit/fxp_hitlit_s1_001";
sound1 = "SE_DUEL/SE_ATTACK_A_LIGHT_DEFAULT_01";
sound2 = "SE_DUEL/SE_ATTACK_A_LIGHT_DEFAULT_02";
}
else if ((attackCard.get_data().Attribute & (uint)CardAttribute.Water) > 0)
{
fx = ABLoader.LoadAB("effects/attack/fxp_atkwtr_s1_001");
hit = "effects/hit/fxp_hitwtr_s1_001";
sound1 = "SE_DUEL/SE_ATTACK_A_WIND_DEFAULT_01";
sound2 = "SE_DUEL/SE_ATTACK_A_WIND_DEFAULT_02";
}
else if ((attackCard.get_data().Attribute & (uint)CardAttribute.Wind) > 0)
{
fx = ABLoader.LoadAB("effects/attack/fxp_atkwid_s1_001");
hit = "effects/hit/fxp_hitwid_s1_001";
sound1 = "SE_DUEL/SE_ATTACK_A_DARK_DEFAULT_01";
sound2 = "SE_DUEL/SE_ATTACK_A_DARK_DEFAULT_02";
}
}
Vector3 v = VectorAttackTarget - VectorAttackCard;
v.y = 0;
Vector3 originalAngle = attackCard.gameObject.transform.eulerAngles;
int directAttack = 0;
if(attackedCard != null)
{
attackCard.gameObject.transform.LookAt(attackedCard.gameObject.transform);
if ((attackedCard.p.position & (uint)CardPosition.FaceUpDefence) > 0)
if (attackedCard.get_data().Defense >= attackCard.get_data().Attack)
{
hit = "effects/hit/fxp_hit_guard_001";
sound2 = "SE_DUEL/SE_ATTACK_GUARD";
}
}
else
{
GameObject dummy = new GameObject();
if(attackCard.p.controller == 0)
{
dummy.transform.position = new Vector3(0f, 0f, 25f);
hit = "effects/hit/fxp_dithit_far_001";
sound2 = "SE_DUEL/SE_DIRECT_ATTACK_PLAYER";
directAttack = 1;
}
else
{
dummy.transform.position = new Vector3(0f, 0f, -25f);
hit = "effects/hit/fxp_dithit_near_001";
sound2 = "SE_DUEL/SE_DIRECT_ATTACK_RIVAL";
directAttack= 2;
}
attackCard.gameObject.transform.LookAt(dummy.transform);
Object.Destroy(dummy);
}
fx.transform.parent = attackCard.gameObject.transform;
fx.transform.localPosition = new Vector3(0f, 0f, 0f);
fx.SetActive(false);
Vector3 faceAngle = attackCard.gameObject.transform.eulerAngles;
attackCard.gameObject.transform.eulerAngles = originalAngle;
//Vector3 fixedVectorAttackTarget = Vector3.zero;
//Vector3 tempVectorAttackCard = VectorAttackCard;
//tempVectorAttackCard.y = 0f;
//Vector3 tempVectorAttackTarget = VectorAttackCard;
//tempVectorAttackTarget.y = 0f;
//for (int i = 100; i > 0; i--)
//{
// Vector3 temp = (tempVectorAttackTarget - tempVectorAttackCard) * i / 100f;
// if (temp.magnitude > 10)
// {
// fixedVectorAttackTarget = VectorAttackCard + temp;
// break;
// }
//}
attackCard.inAnimation = true;
iTween.Pause(attackCard.gameObject);
Sequence quence = DOTween.Sequence();
quence.Append(attackCard.gameObject.transform.DOMove(VectorAttackCard + new Vector3(0f, 10f, 0f) - v * 0.3f, 0.3f).SetEase(Ease.OutCirc).OnComplete(()=> { fx.SetActive(true); }));
quence.Join(attackCard.gameObject.transform.DORotate(faceAngle, 0.3f));
quence.Append(attackCard.gameObject.transform.DOMove(VectorAttackCard + (VectorAttackTarget - VectorAttackCard) * 0.8f + new Vector3(0f, 5f, 0f), 0.1f));
if(directAttack == 1)
quence.Join(Program.I().main_camera.transform.DOMoveZ(Program.I().main_camera.transform.position.z + 5, 0.1f));
else if(directAttack == 2)
quence.Join(Program.I().main_camera.transform.DOMoveZ(Program.I().main_camera.transform.position.z - 5, 0.1f));
if (attackCard.get_data().Attack >= 2000)
quence.AppendCallback(()=>CameraControl.ShakeCameraNowBig());
else else
quence.AppendCallback(() => CameraControl.ShakeCameraNowSmall());
quence.AppendInterval(0.3f);
quence.Append(attackCard.gameObject.transform.DOMove(VectorAttackCard, 0.3f).SetEase(Ease.InQuad).OnComplete(() => { attackCard.inAnimation = false; }));
quence.Insert(0.8f, attackCard.gameObject.transform.DORotate(originalAngle, 0.2f));
SEHandler.Play(sound1);
LoadSFX.DelayDecoration(VectorAttackTarget + new Vector3(0f, 5f, 0f), 0, hit, sound2, 0.4f, true);
if (sound2.Contains("SE_ATTACK_GUARD"))
hasPlayedDamageSE = false;
else
hasPlayedDamageSE = true;
Object.Destroy(fx, 3f);
if (attackCard.gameObject.transform.Find("mod_simple_quad(Clone)") != null)
{ {
animation_battle(VectorAttackCard, VectorAttackTarget, attackCard); CloseUpControl cc = attackCard.gameObject.transform.Find("mod_simple_quad(Clone)").GetChild(0).GetComponent<CloseUpControl>();
cc.FadeOutIn(0f, 0.3f, 0.5f, 0.2f);
}
if (attackedCard.gameObject.transform.Find("mod_simple_quad(Clone)") != null)
{
CloseUpControl cc = attackedCard.gameObject.transform.Find("mod_simple_quad(Clone)").GetChild(0).GetComponent<CloseUpControl>();
cc.FadeOutIn(0.3f, 0.1f, 1f, 0.2f);
} }
Sleep(40); Sleep(24);
} }
break; break;
...@@ -7136,7 +7346,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7136,7 +7346,7 @@ public class Ocgcore : ServantWithCardDescription
for (var i = 0; i < cards.Count; i++) for (var i = 0; i < cards.Count; i++)
if (cards[i].gameObject.activeInHierarchy)//mark星星 if (cards[i].gameObject.activeInHierarchy)//mark星星
{ {
if (cards[i].cookie_cared == false) if (cards[i].cookie_cared == false && cards[i].inAnimation == false)
{ {
cards[i].UA_give_condition(get_point_worldcondition(cards[i].p)); cards[i].UA_give_condition(get_point_worldcondition(cards[i].p));
cards[i].UA_give_position(get_point_worldposition(cards[i].p, cards[i])); cards[i].UA_give_position(get_point_worldposition(cards[i].p, cards[i]));
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TraceCard : MonoBehaviour
{
public bool trace;
}
fileFormatVersion: 2
guid: f3818b34b5c4ac64fa7a6f1e143dff52
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
...@@ -10,6 +10,7 @@ GameObject: ...@@ -10,6 +10,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 427468} - component: {fileID: 427468}
- component: {fileID: 1402605852} - component: {fileID: 1402605852}
- component: {fileID: 2711716875583030410}
m_Layer: 0 m_Layer: 0
m_Name: mod_ocgcore_card m_Name: mod_ocgcore_card
m_TagString: Untagged m_TagString: Untagged
...@@ -53,6 +54,19 @@ MonoBehaviour: ...@@ -53,6 +54,19 @@ MonoBehaviour:
summon: 0 summon: 0
landTime: 0 landTime: 0
type: type:
--- !u!114 &2711716875583030410
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 100424}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f3818b34b5c4ac64fa7a6f1e143dff52, type: 3}
m_Name:
m_EditorClassIdentifier:
trace: 0
--- !u!1 &109792 --- !u!1 &109792
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
--- !u!129 &1 --- !u!129 &1
PlayerSettings: PlayerSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 22 serializedVersion: 23
productGUID: 23639be819f24d044ae93a28448a771b productGUID: 23639be819f24d044ae93a28448a771b
AndroidProfiler: 0 AndroidProfiler: 0
AndroidFilterTouchesWhenObscured: 0 AndroidFilterTouchesWhenObscured: 0
...@@ -152,11 +152,12 @@ PlayerSettings: ...@@ -152,11 +152,12 @@ PlayerSettings:
m_ColorGamuts: 00000000 m_ColorGamuts: 00000000
targetPixelDensity: 30 targetPixelDensity: 30
resolutionScalingMode: 0 resolutionScalingMode: 0
resetResolutionOnWindowResize: 0
androidSupportedAspectRatio: 1 androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1 androidMaxAspectRatio: 2.1
applicationIdentifier: applicationIdentifier:
Android: com.YGOPro2.YGOPro2 Android: com.YGOPro2.YGOPro2
Standalone: com.YGOPro2.YGOPro2 Standalone: com.MDPro2.MDPro2
Tizen: com.YGOPro2.YGOPro2 Tizen: com.YGOPro2.YGOPro2
iPhone: com.YGOPro2.YGOPro2 iPhone: com.YGOPro2.YGOPro2
tvOS: com.YGOPro2.YGOPro2 tvOS: com.YGOPro2.YGOPro2
...@@ -532,6 +533,7 @@ PlayerSettings: ...@@ -532,6 +533,7 @@ PlayerSettings:
switchNetworkInterfaceManagerInitializeEnabled: 1 switchNetworkInterfaceManagerInitializeEnabled: 1
switchPlayerConnectionEnabled: 1 switchPlayerConnectionEnabled: 1
switchUseNewStyleFilepaths: 0 switchUseNewStyleFilepaths: 0
switchUseLegacyFmodPriorities: 1
switchUseMicroSleepForYield: 1 switchUseMicroSleepForYield: 1
switchEnableRamDiskSupport: 0 switchEnableRamDiskSupport: 0
switchMicroSleepForYieldTime: 25 switchMicroSleepForYieldTime: 25
...@@ -742,6 +744,7 @@ PlayerSettings: ...@@ -742,6 +744,7 @@ PlayerSettings:
m_VersionName: m_VersionName:
apiCompatibilityLevel: 6 apiCompatibilityLevel: 6
activeInputHandler: 0 activeInputHandler: 0
windowsGamepadBackendHint: 0
cloudProjectId: cloudProjectId:
framebufferDepthMemorylessMode: 0 framebufferDepthMemorylessMode: 0
qualitySettingsNames: [] qualitySettingsNames: []
......
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