Commit 7008c8dc authored by 赤子奈落's avatar 赤子奈落

fix bugs

parent 20ab69d5
...@@ -166,6 +166,7 @@ public class CardOnSelection : MonoBehaviour ...@@ -166,6 +166,7 @@ public class CardOnSelection : MonoBehaviour
{ {
arrow = ABLoader.LoadAB("effects/other/fxp_arrow_aim_001"); arrow = ABLoader.LoadAB("effects/other/fxp_arrow_aim_001");
arrow.transform.position = card.gameObject.transform.position; arrow.transform.position = card.gameObject.transform.position;
arrow.transform.GetChild(0).GetComponent<Renderer>().material.renderQueue = 3005;
} }
} }
else else
......
...@@ -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);
} //}
} }
} }
This diff is collapsed.
...@@ -30,7 +30,7 @@ public class Menu : WindowServantSP ...@@ -30,7 +30,7 @@ public class Menu : WindowServantSP
UIHelper.registEvent(gameObject, "exit_", onClickExit); UIHelper.registEvent(gameObject, "exit_", onClickExit);
UIHelper.registEvent(gameObject, "animation_", onClickAnimation); UIHelper.registEvent(gameObject, "animation_", onClickAnimation);
//MDPRO2 update //MDPRO2 update
UIHelper.getByName<UILabel>(gameObject, "version_").text = "2.0.3"; UIHelper.getByName<UILabel>(gameObject, "version_").text = "2.0.4";
Program.I().StartCoroutine(checkUpdate()); Program.I().StartCoroutine(checkUpdate());
} }
......
...@@ -609,9 +609,10 @@ public class gameCard : OCGobject ...@@ -609,9 +609,10 @@ public class gameCard : OCGobject
return re; return re;
} }
public void ES_lock(float time) public void ES_lock(float time, bool exitExcited = true)
{ {
ES_exit_excited(false); if(exitExcited)
ES_exit_excited(false);
Object.Destroy(gameObject.AddComponent<card_locker>(), time); Object.Destroy(gameObject.AddComponent<card_locker>(), time);
} }
...@@ -664,9 +665,10 @@ public class gameCard : OCGobject ...@@ -664,9 +665,10 @@ public class gameCard : OCGobject
if (ES_excited_unsafe_should_not_be_changed_dont_touch_this) if (ES_excited_unsafe_should_not_be_changed_dont_touch_this)
{ {
ES_excited_handler_close_up_handler(); ES_excited_handler_close_up_handler();
if(Program.InputGetMouseButtonUp_0 && !clicked) if (Program.InputGetMouseButtonUp_0 && !clicked && (p.location & (uint)CardLocation.Hand) > 0)
ES_enter_clicked();
else if(Program.InputGetMouseButtonUp_0 && (p.location & (uint)CardLocation.Hand) == 0)
ES_enter_clicked(); ES_enter_clicked();
//ES_excited_handler_event_cookie_card_bed(); //ES_excited_handler_event_cookie_card_bed();
} }
} }
...@@ -841,6 +843,7 @@ public class gameCard : OCGobject ...@@ -841,6 +843,7 @@ public class gameCard : OCGobject
var iTweens = gameObject.GetComponents<iTween>(); var iTweens = gameObject.GetComponents<iTween>();
for (var i = 0; i < iTweens.Length; i++) Object.DestroyImmediate(iTweens[i]); for (var i = 0; i < iTweens.Length; i++) Object.DestroyImmediate(iTweens[i]);
flash_line_off(); flash_line_off();
Debug.Log("Exit Excited");
ES_excited_unsafe_should_not_be_changed_dont_touch_this = false; ES_excited_unsafe_should_not_be_changed_dont_touch_this = false;
for (var i = 0; i < buttons.Count; i++) buttons[i].hide(); for (var i = 0; i < buttons.Count; i++) buttons[i].hide();
destroy(gameObject_event_card_bed); destroy(gameObject_event_card_bed);
...@@ -1222,7 +1225,7 @@ public class gameCard : OCGobject ...@@ -1222,7 +1225,7 @@ public class gameCard : OCGobject
Program.I().ocgcore.Sleep((int)((time_delay_landing + time_landing - time_lead) * 60)); Program.I().ocgcore.Sleep((int)((time_delay_landing + time_landing - time_lead) * 60));
else else
Program.I().ocgcore.Sleep(10); Program.I().ocgcore.Sleep(10);
ES_lock(time_delay_landing + time_landing - time_lead); ES_lock(time_delay_landing + time_landing - time_lead, false);
if (summonAnimation) if (summonAnimation)
{ {
......
...@@ -3668,10 +3668,10 @@ public class Ocgcore : ServantWithCardDescription ...@@ -3668,10 +3668,10 @@ public class Ocgcore : ServantWithCardDescription
card.selectPtr = i; card.selectPtr = i;
card.forSelect = true; card.forSelect = true;
//card.add_one_decoration(Program.I().mod_ocgcore_decoration_card_selecting, 4, Vector3.zero, "card_selecting"); //card.add_one_decoration(Program.I().mod_ocgcore_decoration_card_selecting, 4, Vector3.zero, "card_selecting");
if ((card.p.position & (uint)CardPosition.Defence) > 0) if ((card.p.position & (uint)CardPosition.Attack) > 0)
decoration.transform.GetChild(0).transform.localEulerAngles = new Vector3(0, 90, 0);
else
decoration.transform.GetChild(0).transform.localEulerAngles = new Vector3(0, 0, 0); decoration.transform.GetChild(0).transform.localEulerAngles = new Vector3(0, 0, 0);
else
decoration.transform.GetChild(0).transform.localEulerAngles = new Vector3(0, 90, 0);
card.add_one_decoration(decoration, 4, Vector3.zero, "card_selecting"); card.add_one_decoration(decoration, 4, Vector3.zero, "card_selecting");
card.isShowed = true; card.isShowed = true;
card.currentFlash = gameCard.flashType.Select; card.currentFlash = gameCard.flashType.Select;
...@@ -5081,6 +5081,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5081,6 +5081,7 @@ public class Ocgcore : ServantWithCardDescription
VoiceHandler.PlayFixedLine((uint)player, "PayCost"); VoiceHandler.PlayFixedLine((uint)player, "PayCost");
break; break;
case GameMessage.Damage: case GameMessage.Damage:
Debug.Log("Message: Damage");
gameInfo.realize(); gameInfo.realize();
player = localPlayer(r.ReadByte()); player = localPlayer(r.ReadByte());
val = r.ReadInt32(); val = r.ReadInt32();
...@@ -5268,6 +5269,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5268,6 +5269,7 @@ public class Ocgcore : ServantWithCardDescription
break; break;
case GameMessage.Battle: case GameMessage.Battle:
AnimationControl ac = GameObject.Find("new_gameField(Clone)/Assets_Loader").GetComponent<AnimationControl>(); AnimationControl ac = GameObject.Find("new_gameField(Clone)/Assets_Loader").GetComponent<AnimationControl>();
Debug.Log("Message: Battle");
if (Program.I().setting.setting.Vbattle.value) if (Program.I().setting.setting.Vbattle.value)
{ {
removeAttackHandler(); removeAttackHandler();
...@@ -5320,9 +5322,9 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5320,9 +5322,9 @@ public class Ocgcore : ServantWithCardDescription
{ {
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, 5, 25);//mark 玩家被攻击位置 VectorAttackTarget = new Vector3(0, 15, 25);//mark 玩家被攻击位置
else else
VectorAttackTarget = new Vector3(0, 5, -25); VectorAttackTarget = new Vector3(0, 15, -25);
} }
else else
{ {
...@@ -5463,14 +5465,14 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5463,14 +5465,14 @@ public class Ocgcore : ServantWithCardDescription
GameObject dummy = new GameObject(); GameObject dummy = new GameObject();
if(attackCard.p.controller == 0) if(attackCard.p.controller == 0)
{ {
dummy.transform.position = new Vector3(0f, 0f, 25f); dummy.transform.position = new Vector3(0f, 15f, 25f);
hit = "effects/hit/fxp_dithit_far_001"; hit = "effects/hit/fxp_dithit_far_001";
sound2 = "SE_DUEL/SE_DIRECT_ATTACK_PLAYER"; sound2 = "SE_DUEL/SE_DIRECT_ATTACK_PLAYER";
directAttack = 1; directAttack = 1;
} }
else else
{ {
dummy.transform.position = new Vector3(0f, 0f, -25f); dummy.transform.position = new Vector3(0f, 15f, -25f);
hit = "effects/hit/fxp_dithit_near_001"; hit = "effects/hit/fxp_dithit_near_001";
sound2 = "SE_DUEL/SE_DIRECT_ATTACK_RIVAL"; sound2 = "SE_DUEL/SE_DIRECT_ATTACK_RIVAL";
directAttack= 2; directAttack= 2;
...@@ -5514,7 +5516,9 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5514,7 +5516,9 @@ public class Ocgcore : ServantWithCardDescription
CloseUpControl cc = attackCard.gameObject.transform.Find("mod_simple_quad(Clone)").GetChild(0).GetComponent<CloseUpControl>(); CloseUpControl cc = attackCard.gameObject.transform.Find("mod_simple_quad(Clone)").GetChild(0).GetComponent<CloseUpControl>();
cc.FadeOutIn(0f, 0.3f, 0.5f, 0.2f); cc.FadeOutIn(0f, 0.3f, 0.5f, 0.2f);
} }
if (attackedCard.gameObject.transform.Find("mod_simple_quad(Clone)") != null) if (attackedCard != null
&&
attackedCard.gameObject.transform.Find("mod_simple_quad(Clone)") != null)
{ {
CloseUpControl cc = attackedCard.gameObject.transform.Find("mod_simple_quad(Clone)").GetChild(0).GetComponent<CloseUpControl>(); CloseUpControl cc = attackedCard.gameObject.transform.Find("mod_simple_quad(Clone)").GetChild(0).GetComponent<CloseUpControl>();
cc.FadeOutIn(0.3f, 0.1f, 1f, 0.2f); cc.FadeOutIn(0.3f, 0.1f, 1f, 0.2f);
...@@ -5548,7 +5552,9 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5548,7 +5552,9 @@ public class Ocgcore : ServantWithCardDescription
CloseUpControl cc = attackCard.gameObject.transform.Find("mod_simple_quad(Clone)").GetChild(0).GetComponent<CloseUpControl>(); CloseUpControl cc = attackCard.gameObject.transform.Find("mod_simple_quad(Clone)").GetChild(0).GetComponent<CloseUpControl>();
cc.FadeOutIn(0f, 0.5f, 0.55f, 0.2f); cc.FadeOutIn(0f, 0.5f, 0.55f, 0.2f);
} }
if (attackedCard.gameObject.transform.Find("mod_simple_quad(Clone)") != null) if (attackedCard != null
&&
attackedCard.gameObject.transform.Find("mod_simple_quad(Clone)") != null)
{ {
CloseUpControl cc = attackedCard.gameObject.transform.Find("mod_simple_quad(Clone)").GetChild(0).GetComponent<CloseUpControl>(); CloseUpControl cc = attackedCard.gameObject.transform.Find("mod_simple_quad(Clone)").GetChild(0).GetComponent<CloseUpControl>();
cc.FadeOutIn(0.5f, 0.1f, 1f, 0.2f); cc.FadeOutIn(0.5f, 0.1f, 1f, 0.2f);
...@@ -6104,10 +6110,10 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6104,10 +6110,10 @@ public class Ocgcore : ServantWithCardDescription
if ((cardsSelectable[i].p.location & (uint)CardLocation.Onfield) > 0 && (cardsSelectable[i].p.location & (uint)CardLocation.Overlay) == 0) if ((cardsSelectable[i].p.location & (uint)CardLocation.Onfield) > 0 && (cardsSelectable[i].p.location & (uint)CardLocation.Overlay) == 0)
{ {
//cardsSelectable[i].add_one_decoration(Program.I().mod_ocgcore_decoration_card_selecting, 4, Vector3.zero, "card_selecting"); //cardsSelectable[i].add_one_decoration(Program.I().mod_ocgcore_decoration_card_selecting, 4, Vector3.zero, "card_selecting");
if ((cardsSelectable[i].p.position & (uint)CardPosition.Defence) > 0) if ((cardsSelectable[i].p.position & (uint)CardPosition.Attack) > 0)
decoration.transform.GetChild(0).transform.localEulerAngles = new Vector3(0, 90, 0);
else
decoration.transform.GetChild(0).transform.localEulerAngles = new Vector3(0, 0, 0); decoration.transform.GetChild(0).transform.localEulerAngles = new Vector3(0, 0, 0);
else
decoration.transform.GetChild(0).transform.localEulerAngles = new Vector3(0, 90, 0);
cardsSelectable[i].add_one_decoration(decoration, 4, Vector3.zero, "card_selecting"); cardsSelectable[i].add_one_decoration(decoration, 4, Vector3.zero, "card_selecting");
} }
cardsSelectable[i].currentFlash = gameCard.flashType.Select; cardsSelectable[i].currentFlash = gameCard.flashType.Select;
......
...@@ -21,7 +21,10 @@ public class placeSelector : MonoBehaviour { ...@@ -21,7 +21,10 @@ public class placeSelector : MonoBehaviour {
selectableGO = ABLoader.LoadAB("effects/hitghlight/fxp_hl_select/fxp_hl_select_trpmgc_001"); selectableGO = ABLoader.LoadAB("effects/hitghlight/fxp_hl_select/fxp_hl_select_trpmgc_001");
} }
else if (transform.position.z == -10 || transform.position.z == 10)//场地 else if (transform.position.z == -10 || transform.position.z == 10)//场地
selectableGO = ABLoader.LoadAB("effects/hitghlight/fxp_hl_select/fxp_hl_select_trpmgc_001"); {
selectableGO = ABLoader.LoadAB("effects/hitghlight/fxp_hl_select/fxp_hl_select_card_001");
selectableGO.transform.localScale = new Vector3(0.8f, 0.8f, 0.8f);
}
else//额外怪兽区 else//额外怪兽区
selectableGO = ABLoader.LoadAB("effects/hitghlight/fxp_hl_select/fxp_hl_select_mst_001"); selectableGO = ABLoader.LoadAB("effects/hitghlight/fxp_hl_select/fxp_hl_select_mst_001");
var main = selectableGO.GetComponent<ParticleSystem>().main; var main = selectableGO.GetComponent<ParticleSystem>().main;
......
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