Commit 0889f6e8 authored by SherryChaos's avatar SherryChaos

speed up for duel

parent 37e4b30b
This diff is collapsed.
fileFormatVersion: 2
guid: 27f50d889844fb84ca79ae8635801e2d
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
MDPro3 v1.1.1更新:
1.同步YGOPro,支持组队决斗投降
2.修复上版本中,部分新卡在本地模式下无法发动效果的错误
3.修复上版本中,编辑卡组模式下,卡图加载过程中退出卡组编辑模式,导致游戏不能继续读取卡图的错误。
1.新投稿动画:琰魔龙 红莲魔·渊、龙骑士 D-终
2.现在在决斗中也能开启加速了,回放下为2倍速,其他模式下为1.5倍速
3.修复上版本中,部分新卡在本地模式下无法发动效果的错误。
4.修复上版本中,编辑卡组模式下,卡图加载过程中退出卡组编辑模式,导致游戏不能继续读取卡图的错误。
MDPro3 v1.1.0更新:
0.本次更新安卓端需要卸载老版本才能进行安装。安卓端的首选图形API改为Vulkan。
......
This diff is collapsed.
This diff is collapsed.
......@@ -40,7 +40,6 @@ namespace MDPro3
public CardList list;
public DuelLog log;
public RectTransform popup;
public GameObject replayButtons;
public GameObject buttonStop;
public GameObject buttonPlay;
public GameObject buttonAcc;
......@@ -174,14 +173,19 @@ namespace MDPro3
}
public void OnAcc()
{
float targetSpeed = 1.5f;
#if UNITY_EDITOR
Program.I().timeScaleForEdit = 2f;
if(condition == Condition.Replay)
targetSpeed = 2f;
Program.I().timeScaleForEdit = targetSpeed;
#else
Program.I().timeScale = 2f;
if (condition == Condition.Replay)
targetSpeed = 2f;
Program.I().timeScale = targetSpeed;
#endif
buttonAcc.SetActive(false);
buttonNor.SetActive(true);
SetBgTimeScale(0.5f);
SetBgTimeScale(1f / targetSpeed);
}
public void OnNor()
{
......@@ -1450,10 +1454,6 @@ namespace MDPro3
cantCheckGrave = false;
cookie_matchKill = 0;
needDamageResponseInstant = false;
if (condition == Condition.Replay)
replayButtons.SetActive(true);
else
replayButtons.SetActive(false);
buttonStop.SetActive(true);
buttonPlay.SetActive(false);
buttonAcc.SetActive(true);
......@@ -7089,10 +7089,15 @@ namespace MDPro3
{
Tools.SetAnimatorTimescale(field0.transform, timeScale);
Tools.SetAnimatorTimescale(field1.transform, timeScale);
Tools.SetParticleSystemSimulationSpeed(field0.transform, timeScale);
Tools.SetParticleSystemSimulationSpeed(field1.transform, timeScale);
if (mate0 != null)
mate0.SetTimeScale(timeScale);
if (mate1 != null)
mate1.SetTimeScale(timeScale);
foreach (var card in cards)
if (card.model != null)
Tools.SetAnimatorTimescale(card.model.transform, timeScale);
}
public void GraveBgEffect(GPS p, bool cardIn)
......
......@@ -242,30 +242,37 @@ namespace MDPro3
exportPicture.onClick.AddListener(OnExportPictures);
clearPicture.onClick.AddListener(OnClearPictures);
clearExpansions.onClick.AddListener(OnClearExpansions);
supportExpansions.onClick.AddListener(OnSupportExpansions);
updatePrerelease.onClick.AddListener(OnUpdatePrerelease);
bgmVol.value = int.Parse(Config.Get("BgmVol", "700")) / (float)1000;
OnBgmVolChange(bgmVol.value);
seVol.value = int.Parse(Config.Get("SeVol", "700")) / (float)1000;
OnSeVolChange(seVol.value);
voiceVol.value = int.Parse(Config.Get("VoiceVol", "700")) / (float)1000;
OnVoiceVolChange(voiceVol.value);
fps.value = int.Parse(Config.Get("FPS", "60"));
scale.value = int.Parse(Config.Get("Scale", "1000")) / (float)1000;
supportExpansions.onClick.AddListener(OnSupportExpansions);
updatePrerelease.onClick.AddListener(OnUpdatePrerelease);
OnFpsChange(fps.value);
var defau = "1000";
#if UNITY_ANDROID
defau = "500";
#endif
scale.value = int.Parse(Config.Get("Scale", defau)) / (float)1000;
OnScaleChange(scale.value);
defau = "1000";
#if UNITY_ANDROID
defau = "1500";
#endif
uiScale.value = int.Parse(Config.Get("UIScale", defau)) / (float)1000;
quality.value = int.Parse(Config.Get("Quality", "3"));
OnQualityChange(quality.value);
faa.value = int.Parse(Config.Get("FAA", "1"));
OnFAAChange(faa.value);
aaa.value = int.Parse(Config.Get("AAA", "0"));
OnAAAChange(aaa.value);
shadow.value = int.Parse(Config.Get("Shadow", "0"));
OnShadowChange(shadow.value);
InitializeShowFPS();
InitializeScreenMode();
InitializeResolution();
......
......@@ -75,6 +75,15 @@ namespace MDPro3
foreach (var animator in container.GetComponentsInChildren<Animator>(true))
animator.speed = timeScale;
}
public static void SetParticleSystemSimulationSpeed(Transform container, float timeScale)
{
foreach(var particle in container.GetComponentsInChildren<ParticleSystem>(true))
{
var main = particle.main;
main.simulationSpeed = timeScale;
}
}
public static void SetPlayableDirectorUnscaledGameTime(Transform container)
{
foreach (var director in container.GetComponentsInChildren<PlayableDirector>(true))
......
......@@ -51,7 +51,7 @@ namespace MDPro3.UI
if (timeLimit == 0)
DuelEnd();
pastTime += Time.deltaTime;
pastTime += Time.unscaledDeltaTime;
int remainTime = Mathf.CeilToInt(time - pastTime);
text.text = remainTime.ToString();
......
......@@ -35,6 +35,8 @@ namespace MDPro3.UI
public bool unselectable;
static Color unselectableColor = new Color(0.5f, 0.5f, 0.5f, 1f);
public bool preselected;
static float doubleClickTime = 0.2f;
private void Start()
{
......@@ -159,7 +161,7 @@ namespace MDPro3.UI
{
if (!unselectable)
{
if ((Time.time - clickTime) < 0.2f)
if ((Time.time - clickTime) < doubleClickTime * Time.timeScale)
{
if (manager.selectedCount == 1 && manager.min == 1 && manager.max == 1)
manager.OnConfirm();
......
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