Commit f29e4875 authored by SherryChaos's avatar SherryChaos

bug fix

parent d08c9cf5
......@@ -1042,7 +1042,7 @@ MonoBehaviour:
m_Font: {fileID: 12800000, guid: cdf4c81f8bf6eb248a105d8a5edf19fd, type: 3}
m_FontSize: 40
m_FontStyle: 0
m_BestFit: 0
m_BestFit: 1
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 5
......@@ -6311,7 +6311,7 @@ MonoBehaviour:
m_MinSize: 0
m_MaxSize: 55
m_Alignment: 3
m_AlignByGeometry: 1
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
......@@ -14563,7 +14563,7 @@ MonoBehaviour:
ocgcore: {fileID: 1513174787}
room: {fileID: 437956626}
editDeck: {fileID: 531693331}
timeScaleFloat: 1
timeScaleForEdit: 1
currentServant: {fileID: 0}
currentSubServant: {fileID: 0}
depth: 0
......@@ -14958,7 +14958,7 @@ MonoBehaviour:
m_Font: {fileID: 12800000, guid: cdf4c81f8bf6eb248a105d8a5edf19fd, type: 3}
m_FontSize: 40
m_FontStyle: 0
m_BestFit: 0
m_BestFit: 1
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 5
......@@ -15059,7 +15059,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 1581995138}
m_Direction: 2
m_Value: 0
m_Size: 1
m_Size: 0
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
......@@ -18424,7 +18424,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 931169952}
m_Direction: 2
m_Value: 0
m_Size: 1
m_Size: 0.6103896
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
......@@ -34002,7 +34002,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0.000030517578}
m_AnchoredPosition: {x: 0, y: -0.000030517578}
m_SizeDelta: {x: 0, y: 300}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &702608002
......@@ -53275,7 +53275,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0.000030517578}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 300}
m_Pivot: {x: 0.5, y: 1}
--- !u!1 &1117266860
......@@ -57078,7 +57078,7 @@ MonoBehaviour:
m_Font: {fileID: 12800000, guid: cdf4c81f8bf6eb248a105d8a5edf19fd, type: 3}
m_FontSize: 40
m_FontStyle: 0
m_BestFit: 0
m_BestFit: 1
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 5
......@@ -66427,7 +66427,7 @@ MonoBehaviour:
m_Font: {fileID: 12800000, guid: cdf4c81f8bf6eb248a105d8a5edf19fd, type: 3}
m_FontSize: 40
m_FontStyle: 0
m_BestFit: 0
m_BestFit: 1
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 5
......@@ -69042,7 +69042,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 761159127}
m_Direction: 2
m_Value: 0
m_Size: 1
m_Size: 0.6629212
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
......@@ -72587,7 +72587,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 2083794100}
m_Direction: 2
m_Value: 0
m_Size: 1
m_Size: 0.55882347
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
......@@ -73047,7 +73047,7 @@ MonoBehaviour:
m_Font: {fileID: 12800000, guid: cdf4c81f8bf6eb248a105d8a5edf19fd, type: 3}
m_FontSize: 40
m_FontStyle: 0
m_BestFit: 0
m_BestFit: 1
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 5
......@@ -75231,7 +75231,7 @@ MonoBehaviour:
m_Font: {fileID: 12800000, guid: cdf4c81f8bf6eb248a105d8a5edf19fd, type: 3}
m_FontSize: 40
m_FontStyle: 0
m_BestFit: 0
m_BestFit: 1
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 5
......@@ -92450,7 +92450,7 @@ MonoBehaviour:
m_Font: {fileID: 12800000, guid: cdf4c81f8bf6eb248a105d8a5edf19fd, type: 3}
m_FontSize: 40
m_FontStyle: 0
m_BestFit: 0
m_BestFit: 1
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 5
......@@ -1024,7 +1024,7 @@ namespace MDPro3
return 0.2f;
}
//Token In
//Token In (from unknow)
if (cacheP.location == 0)
{
AudioManager.PlaySE("SE_CARD_TOKEN_SUMMON");
......@@ -1044,7 +1044,7 @@ namespace MDPro3
Destroy(fx, 2f);
return 0.5f;
}
//Token Out
//Token Out (to unknow)
if (p.location == 0)
{
AudioManager.PlaySE("SE_CARD_TOKEN_BREAK");
......@@ -1134,7 +1134,7 @@ namespace MDPro3
moveTime = 0.2f;
break;
}
TokenPass:
var cardPlane = manager.GetElement<Transform>("CardPlane");
var pivot = manager.GetElement<Transform>("Pivot");
var offset = manager.GetElement<Transform>("Offset");
......@@ -1785,6 +1785,10 @@ namespace MDPro3
fx.transform.localEulerAngles = new Vector3(0, 90, 0);
if ((p.location & (uint)CardLocation.SpellZone) > 0)
fx.transform.localScale = Vector3.one * 0.8f;
if ((p.location & ((uint)CardLocation.Deck + (uint)CardLocation.Extra)) > 0)
{
fx.transform.localEulerAngles = new Vector3(0, GetCardRotation(p).y, 0);
}
Destroy(fx, 1f);
}
public void AnimationLandShake(GameCard card, bool huge)
......@@ -1822,6 +1826,7 @@ namespace MDPro3
sequence.AppendInterval(1f * id);
sequence.Append(turn.DOLocalMoveY(2, 0.1f).OnStart(() =>
{
Program.I().ocgcore.description.Show(this, null);
model.SetActive(true);
if (Program.I().ocgcore.GetLocationCardCount(CardLocation.Deck, p.controller) == 1)
{
......
......@@ -45,10 +45,6 @@ namespace MDPro3
public Room room;
public EditDeck editDeck;
#if UNITY_EDITOR
public float timeScaleFloat = 1;
#endif
#region Initializement
private static Program instance;
......@@ -160,6 +156,9 @@ namespace MDPro3
}
}
float m_timeScale = 1f;
#if UNITY_EDITOR
public float timeScaleForEdit = 1;
#endif
public static bool InputGetMouse0;
public static bool InputGetMouse0Down;
......@@ -206,7 +205,7 @@ namespace MDPro3
foreach (Servant servant in servants) servant.PerFrameFunction();
#if UNITY_EDITOR
timeScale = timeScaleFloat;
timeScale = timeScaleForEdit;
#endif
}
......
......@@ -169,7 +169,7 @@ namespace MDPro3
{
playing = false;
});
code = AliasCode(code);
Card card = CardsManager.Get(code);
GameObject loader = null;
......@@ -382,5 +382,18 @@ namespace MDPro3
handler.cardName = task[1];
handler.Refresh();
}
static int AliasCode(int code)
{
if (code == 89631142 || code == 89631148)//青眼白龙
return 89631141;
if (code == 89943725)//新宇侠
return 89943723;
if (code == 46986424 || code == 46986426)//黑魔术师
return 46986417;
if (code == 74677425)//真红眼黑龙
return 74677424;
return code;
}
}
}
......@@ -20,7 +20,6 @@ using MDPro3.YGOSharp.OCGWrapper.Enums;
using static YgomGame.Bg.BgEffectSettingInner;
using MDPro3.UI;
namespace MDPro3
{
public class OcgCore : Servant
......@@ -165,14 +164,22 @@ namespace MDPro3
}
public void OnAcc()
{
#if UNITY_EDITOR
Program.I().timeScaleForEdit = 2f;
#else
Program.I().timeScale = 2f;
#endif
buttonAcc.SetActive(false);
buttonNor.SetActive(true);
SetBgTimeScale(0.5f);
}
public void OnNor()
{
#if UNITY_EDITOR
Program.I().timeScaleForEdit = 1f;
#else
Program.I().timeScale = 1f;
#endif
buttonAcc.SetActive(true);
buttonNor.SetActive(false);
SetBgTimeScale(1f);
......@@ -1126,7 +1133,7 @@ namespace MDPro3
}
}
#endregion
#endregion
#region Message
public List<GameCard> cards = new List<GameCard>();
......@@ -1543,6 +1550,15 @@ namespace MDPro3
name_1_tag = r.ReadUnicode(50);
name_1_c = r.ReadUnicode(50);
var isTag = !(name_0_tag == "---" && name_1_tag == "---" && name_0 == name_0_c && name_1 == name_1_c);
if (Config.Get("ReplayPlayerName0", "@ui").Length > 0)
name_0 = Config.Get("ReplayPlayerName0", "@ui");
if (Config.Get("ReplayPlayerName1", "@ui").Length > 0)
name_1 = Config.Get("ReplayPlayerName1", "@ui");
if (Config.Get("ReplayPlayerName0Tag", "@ui").Length > 0)
name_0_tag = Config.Get("ReplayPlayerName0Tag", "@ui");
if (Config.Get("ReplayPlayerName1Tag", "@ui").Length > 0)
name_1_tag = Config.Get("ReplayPlayerName1Tag", "@ui");
if (isTag)
{
if (isFirst)
......@@ -1556,6 +1572,11 @@ namespace MDPro3
name_1_c = name_1;
}
}
else
{
name_0_c = name_0;
name_1_c = name_1;
}
player0Name.text = name_0_c;
player1Name.text = name_1_c;
SetFace();
......@@ -2901,8 +2922,13 @@ namespace MDPro3
if (life0 <= 0 || life1 <= 0)
{
AudioManager.StopBGM();
#if UNITY_EDITOR
Program.I().timeScaleForEdit = 0.1f;
DOTween.To(() => Program.I().timeScaleForEdit, x => Program.I().timeScaleForEdit = x, 1, 0.8f).SetEase(Ease.InQuad);
#else
Program.I().timeScale = 0.1f;
DOTween.To(() => Program.I().timeScale, x => Program.I().timeScale = x, 1, 0.8f).SetEase(Ease.InQuad);
#endif
if (life0 <= 0)
{
......@@ -2963,8 +2989,13 @@ namespace MDPro3
}
if (life0 <= 0 || life1 <= 0)
{
#if UNITY_EDITOR
Program.I().timeScaleForEdit = 0.1f;
DOTween.To(() => Program.I().timeScaleForEdit, x => Program.I().timeScaleForEdit = x, 1, 0.8f).SetEase(Ease.InQuad);
#else
Program.I().timeScale = 0.1f;
DOTween.To(() => Program.I().timeScale, x => Program.I().timeScale = x, 1, 0.8f).SetEase(Ease.InQuad);
#endif
if (life0 <= 0)
{
hitObj = ABLoader.LoadFromFile("effects/hit/fxp_dithit_fin_near_001");
......@@ -3409,6 +3440,7 @@ namespace MDPro3
if (card != null)
{
card.SetCode(code);
description.Show(card, null);
card.AnimationConfirm();
}
}
......@@ -3620,10 +3652,6 @@ namespace MDPro3
manager = manager.GetElement<ElementObjectManager>("SummonPendulumShowCard");
pendulum.transform.SetParent(Program.I().container_3D, false);
Tools.ChangeLayer(pendulum, "DuelOverlay3D");
//AudioManager.PlaySE("SE_SMN_PENDULUM_01_01");
//AudioManager.PlaySE("SE_SMN_PENDULUM_01_02");
//AudioManager.PlaySE("SE_SMN_PENDULUM_01_03");
//AudioManager.PlaySE("SE_SMN_PENDULUM_02");
var card1 = manager.GetElement<ElementObjectManager>("DummyCard01");
var card2 = manager.GetElement<ElementObjectManager>("DummyCard02");
......@@ -3697,7 +3725,6 @@ namespace MDPro3
if (MasterRule >= 4)
{
//AudioManager.PlaySE("SE_SUMMON_PENDULUM_SET");
var pendulumSet = ABLoader.LoadFromFolder("timeline/summon/summonpendulum/summonpendulumscaleset", "PendulumSet", true);
pendulumSet.transform.SetParent(Program.I().container_3D);
ElementObjectManager setManager = null;
......@@ -3832,14 +3859,13 @@ namespace MDPro3
for (int i = 0; i < count; i++)
ES_searchCodes.Add(r.ReadInt32());
selections = new List<string>()
{
InterString.Get("请输入关键字:"),
InterString.Get("搜索"),
string.Empty,
string.Empty
};
{
InterString.Get("请输入关键字:"),
InterString.Get("搜索"),
string.Empty,
string.Empty
};
ShowPopupInput(selections, OnAnnounceCard, null);
//ac
break;
case GameMessage.SelectIdleCmd:
if (InIgnoranceReplay()) break;
......@@ -4023,12 +4049,12 @@ namespace MDPro3
// title = forReplaceFirst.Replace(title, "「" + cardsInChain[currentChainNumber - 1].GetData().Name + "」", 1);
//}
selections = new List<string>
{
title,
desc,
InterString.Get("是"),
InterString.Get("否")
};
{
title,
desc,
InterString.Get("是"),
InterString.Get("否")
};
Action yes = () =>
{
var binaryMaster = new BinaryMaster();
......
......@@ -134,7 +134,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 0.5.3
bundleVersion: 0.6.1
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
......@@ -529,7 +529,7 @@ PlayerSettings:
m_APIs: 0b000000
m_Automatic: 1
- m_BuildTarget: WindowsStandaloneSupport
m_APIs: 0b000000020000001200000015000000
m_APIs: 0200000012000000150000000b000000
m_Automatic: 0
m_BuildTargetVRSettings:
- m_BuildTarget: Standalone
......
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