You need to sign in or sign up before continuing.
Commit b22b054e authored by lllyasviel's avatar lllyasviel

fix bugs and add effect for link zone and linked spsummon

parent c853aa0f
...@@ -30,7 +30,7 @@ public class LAZYsetting : MonoBehaviour { ...@@ -30,7 +30,7 @@ public class LAZYsetting : MonoBehaviour {
public UIToggle Vactm; public UIToggle Vactm;
public UIToggle Vacts; public UIToggle Vacts;
public UIToggle Vactt; public UIToggle Vactt;
public UIToggle Vlink;
public UIToggle Vfield; public UIToggle Vfield;
public UIToggle resize; public UIToggle resize;
......
...@@ -2,5 +2,5 @@ fileFormatVersion: 2 ...@@ -2,5 +2,5 @@ fileFormatVersion: 2
guid: 64db25af7eb284e4391fec607e3b2cc5 guid: 64db25af7eb284e4391fec607e3b2cc5
NativeFormatImporter: NativeFormatImporter:
userData: userData:
assetBundleName: assetBundleName: 20170219
assetBundleVariant: assetBundleVariant: 0201
...@@ -51,5 +51,5 @@ TextureImporter: ...@@ -51,5 +51,5 @@ TextureImporter:
sprites: [] sprites: []
spritePackingTag: spritePackingTag:
userData: userData:
assetBundleName: assetBundleName: 20170219
assetBundleVariant: assetBundleVariant: 0201
fileFormatVersion: 2
guid: 31f237d5f58cc3d44b8c6f489981cdbe
timeCreated: 1495458917
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName: 20170219
assetBundleVariant: 0201
fileFormatVersion: 2
guid: 868c8ef03b5990d4db7b7e891c456cee
folderAsset: yes
timeCreated: 1495457253
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
...@@ -51,5 +51,5 @@ TextureImporter: ...@@ -51,5 +51,5 @@ TextureImporter:
sprites: [] sprites: []
spritePackingTag: spritePackingTag:
userData: userData:
assetBundleName: assetBundleName: 20170219
assetBundleVariant: assetBundleVariant: 0201
...@@ -509,6 +509,10 @@ public class GameField : OCGobject ...@@ -509,6 +509,10 @@ public class GameField : OCGobject
currentString = "T" + Program.I().ocgcore.turns.ToString() + " " + hint; currentString = "T" + Program.I().ocgcore.turns.ToString() + " " + hint;
realize(); realize();
} }
public void setHintLogical(string hint)
{
currentString = "T" + Program.I().ocgcore.turns.ToString() + " " + hint;
}
GameObject big_string; GameObject big_string;
public void animation_show_big_string(Texture2D tex,bool only=false) public void animation_show_big_string(Texture2D tex,bool only=false)
......
...@@ -36,6 +36,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -36,6 +36,7 @@ public class Ocgcore : ServantWithCardDescription
{ {
public GPS p; public GPS p;
public GameObject gameObject; public GameObject gameObject;
public bool eff = false;
} }
List<linkMask> linkMaskList = new List<linkMask>(); List<linkMask> linkMaskList = new List<linkMask>();
...@@ -44,13 +45,34 @@ public class Ocgcore : ServantWithCardDescription ...@@ -44,13 +45,34 @@ public class Ocgcore : ServantWithCardDescription
{ {
linkMask ma = new linkMask(); linkMask ma = new linkMask();
ma.p = p; ma.p = p;
ma.gameObject = create_s(Program.I().mod_simple_quad, get_point_worldposition(p)+new Vector3(0,-0.1f,0), new Vector3(90, 0, 0), false, null, true); ma.eff = !Program.I().setting.setting.Vlink.value;
ma.gameObject.transform.localScale = new Vector3(4, 4, 4); shift_effect(ma, Program.I().setting.setting.Vlink.value);
ma.gameObject.GetComponent<Renderer>().material.mainTexture = GameTextureManager.LINKm;
ma.gameObject.GetComponent<Renderer>().material.color = new Color(1, 1, 1, 0.8f);
return ma; return ma;
} }
void shift_effect(linkMask target, bool value)
{
if (target.eff != value)
{
if (target.gameObject != null)
{
destroy(target.gameObject);
}
if (value)
{
target.gameObject = create_s(Program.I().mod_ocgcore_ss_link_mark, get_point_worldposition(target.p) + new Vector3(0, -0.1f, 0), Vector3.zero, false, null, true);
}
else
{
target.gameObject = create_s(Program.I().mod_simple_quad, get_point_worldposition(target.p) + new Vector3(0, -0.1f, 0), new Vector3(90, 0, 0), false, null, true);
target.gameObject.transform.localScale = new Vector3(4, 4, 4);
target.gameObject.GetComponent<Renderer>().material.mainTexture = GameTextureManager.LINKm;
target.gameObject.GetComponent<Renderer>().material.color = new Color(1, 1, 1, 0.8f);
}
target.eff = value;
}
}
gameCardCondition get_point_worldcondition(GPS p) gameCardCondition get_point_worldcondition(GPS p)
{ {
gameCardCondition return_value = gameCardCondition.floating_clickable; gameCardCondition return_value = gameCardCondition.floating_clickable;
...@@ -2053,6 +2075,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2053,6 +2075,7 @@ public class Ocgcore : ServantWithCardDescription
printDuelLog(InterString.Get("「[?]」失去了时点。", UIHelper.getSuperName(YGOSharp.CardsManager.Get(code).Name, code))); printDuelLog(InterString.Get("「[?]」失去了时点。", UIHelper.getSuperName(YGOSharp.CardsManager.Get(code).Name, code)));
break; break;
case GameMessage.NewTurn: case GameMessage.NewTurn:
toDefaultHintLogical();
gameField.currentPhase = GameField.ph.dp; gameField.currentPhase = GameField.ph.dp;
// keys.Insert(0, currentMessageIndex); // keys.Insert(0, currentMessageIndex);
player = localPlayer(r.ReadByte()); player = localPlayer(r.ReadByte());
...@@ -2070,6 +2093,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2070,6 +2093,7 @@ public class Ocgcore : ServantWithCardDescription
ES_hint = ES_turnString + ES_phaseString; ES_hint = ES_turnString + ES_phaseString;
break; break;
case GameMessage.NewPhase: case GameMessage.NewPhase:
toDefaultHintLogical();
autoForceChainHandler = autoForceChainHandlerType.manDoAll; autoForceChainHandler = autoForceChainHandlerType.manDoAll;
// keys.Insert(0, currentMessageIndex); // keys.Insert(0, currentMessageIndex);
ushort ph = r.ReadUInt16(); ushort ph = r.ReadUInt16();
...@@ -4306,6 +4330,18 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4306,6 +4330,18 @@ public class Ocgcore : ServantWithCardDescription
} }
UIHelper.playSound("specialsummon2", 1f); UIHelper.playSound("specialsummon2", 1f);
} }
else if (GameStringHelper.differ(card.get_data().Type, (long)game_type.link))
{
if (Program.I().setting.setting.Vlink.value == true)
{
float sc = Mathf.Clamp(card.get_data().Attack, 0, 3500) / 3000f;
Program.I().mod_ocgcore_ss_spsummon_link.GetComponent<partical_scaler>().scale = sc * 4f;
Program.I().mod_ocgcore_ss_spsummon_link.transform.localScale = Vector3.one * (sc * 4f);
card.animationEffect(Program.I().mod_ocgcore_ss_spsummon_link);
mod.GetComponent<partical_scaler>().scale = Mathf.Clamp(card.get_data().Attack, 0, 3500) / 3000f * 3f;
}
UIHelper.playSound("specialsummon2", 1f);
}
else else
{ {
UIHelper.playSound("specialsummon", 1f); UIHelper.playSound("specialsummon", 1f);
...@@ -6709,6 +6745,11 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6709,6 +6745,11 @@ public class Ocgcore : ServantWithCardDescription
removeList.Clear(); removeList.Clear();
removeList = null; removeList = null;
for (int i = 0; i < linkMaskList.Count; i++)
{
shift_effect(linkMaskList[i],Program.I().setting.setting.Vlink.value);
}
gameField.Update(); gameField.Update();
//op hand //op hand
List<gameCard> line = new List<gameCard>(); List<gameCard> line = new List<gameCard>();
...@@ -7117,7 +7158,6 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7117,7 +7158,6 @@ public class Ocgcore : ServantWithCardDescription
animation_count(gameField.LOCATION_GRAVE_1, game_location.LOCATION_GRAVE, 1); animation_count(gameField.LOCATION_GRAVE_1, game_location.LOCATION_GRAVE, 1);
animation_count(gameField.LOCATION_REMOVED_1, game_location.LOCATION_REMOVED, 1); animation_count(gameField.LOCATION_REMOVED_1, game_location.LOCATION_REMOVED, 1);
gameField.realize(); gameField.realize();
toDefaultHint();
Program.notGo(gameInfo.realize); Program.notGo(gameInfo.realize);
Program.go(50,gameInfo.realize); Program.go(50,gameInfo.realize);
Program.notGo(Program.I().book.realize); Program.notGo(Program.I().book.realize);
...@@ -7842,6 +7882,11 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7842,6 +7882,11 @@ public class Ocgcore : ServantWithCardDescription
gameField.setHint(ES_turnString + ES_phaseString); gameField.setHint(ES_turnString + ES_phaseString);
} }
void toDefaultHintLogical()
{
gameField.setHintLogical(ES_turnString + ES_phaseString);
}
void returnFromDeckEdit() void returnFromDeckEdit()
{ {
TcpHelper.CtosMessage_UpdateDeck(((DeckManager)Program.I().deckManager).getRealDeck()); TcpHelper.CtosMessage_UpdateDeck(((DeckManager)Program.I().deckManager).getRealDeck());
......
...@@ -76,9 +76,11 @@ public class Program : MonoBehaviour ...@@ -76,9 +76,11 @@ public class Program : MonoBehaviour
public GameObject mod_ocgcore_ss_spsummon_ronghe; public GameObject mod_ocgcore_ss_spsummon_ronghe;
public GameObject mod_ocgcore_ss_spsummon_tongtiao; public GameObject mod_ocgcore_ss_spsummon_tongtiao;
public GameObject mod_ocgcore_ss_spsummon_yishi; public GameObject mod_ocgcore_ss_spsummon_yishi;
public GameObject mod_ocgcore_ss_spsummon_link;
public GameObject mod_ocgcore_ss_p_idle_effect; public GameObject mod_ocgcore_ss_p_idle_effect;
public GameObject mod_ocgcore_ss_p_sum_effect; public GameObject mod_ocgcore_ss_p_sum_effect;
public GameObject mod_ocgcore_ss_dark_hole; public GameObject mod_ocgcore_ss_dark_hole;
public GameObject mod_ocgcore_ss_link_mark;
public GameObject new_ui_menu; public GameObject new_ui_menu;
public GameObject new_ui_setting; public GameObject new_ui_setting;
public GameObject new_ui_book; public GameObject new_ui_book;
...@@ -230,11 +232,12 @@ public class Program : MonoBehaviour ...@@ -230,11 +232,12 @@ public class Program : MonoBehaviour
loadResource(mod_ocgcore_ss_spsummon_normal); loadResource(mod_ocgcore_ss_spsummon_normal);
loadResource(mod_ocgcore_ss_spsummon_ronghe); loadResource(mod_ocgcore_ss_spsummon_ronghe);
loadResource(mod_ocgcore_ss_spsummon_tongtiao); loadResource(mod_ocgcore_ss_spsummon_tongtiao);
loadResource(mod_ocgcore_ss_spsummon_link);
loadResource(mod_ocgcore_ss_spsummon_yishi); loadResource(mod_ocgcore_ss_spsummon_yishi);
loadResource(mod_ocgcore_ss_p_idle_effect); loadResource(mod_ocgcore_ss_p_idle_effect);
loadResource(mod_ocgcore_ss_p_sum_effect); loadResource(mod_ocgcore_ss_p_sum_effect);
loadResource(mod_ocgcore_ss_dark_hole); loadResource(mod_ocgcore_ss_dark_hole);
loadResource(mod_ocgcore_ss_link_mark);
} }
public static float transparency = 0; public static float transparency = 0;
......
...@@ -58,7 +58,6 @@ public class Setting : WindowServant2D ...@@ -58,7 +58,6 @@ public class Setting : WindowServant2D
{ {
collection[i].value = UIHelper.fromStringToBool(Config.Get(collection[i].name, "0")); collection[i].value = UIHelper.fromStringToBool(Config.Get(collection[i].name, "0"));
} }
} }
} }
setting.showoffATK.value = Config.Get("showoffATK","1800"); setting.showoffATK.value = Config.Get("showoffATK","1800");
...@@ -70,6 +69,7 @@ public class Setting : WindowServant2D ...@@ -70,6 +69,7 @@ public class Setting : WindowServant2D
UIHelper.registEvent(setting.cloud.gameObject, onchangeCloud); UIHelper.registEvent(setting.cloud.gameObject, onchangeCloud);
UIHelper.registEvent(setting.Vpedium.gameObject, onCP); UIHelper.registEvent(setting.Vpedium.gameObject, onCP);
UIHelper.registEvent(setting.Vfield.gameObject, onCP); UIHelper.registEvent(setting.Vfield.gameObject, onCP);
UIHelper.registEvent(setting.Vlink.gameObject, onCP);
onchangeMouse(); onchangeMouse();
onchangeCloud(); onchangeCloud();
} }
......
No preview for this file type
fileFormatVersion: 2
guid: 8feaa1cb8c38fb94ab91d7f27b7d6722
timeCreated: 1495455926
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName: 20170219
assetBundleVariant: 0201
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