[英]Script optimization C#
我正在为一个名为Livesplit的程序进行自动拆分。 它用于快速运行,并且通过创建自动拆分器,您可以观察内存地址,以告诉应用程序在值更改时执行操作。
它正在使用C#,因此做一些魔术应该不是问题。
我是一个完整的编码菜鸟,几乎有零编程经验。 我不知道如何优化此代码,因此它首先看起来并不糟糕,其次它使应用程序本身没有问题。
现在,我的代码看起来像这样,但令人恐惧。
state("GoingDown", "v1")
{
int Loading : "GoingDown.exe", 0x6874EC;
string30 LevelFirst : "GoingDown.exe", 0x263E28;
string30 LevelSecond : "GoingDown.exe", 0x263E37;
string15 Cutscene : "GoingDown.exe", 0x26B543;
}
state("GoingDown", "v2")
{
int Loading : "GoingDown.exe", 0x6874EC;
string30 LevelFirst : "GoingDown.exe", 0x263E40;
string30 LevelSecond : "GoingDown.exe", 0x263E4F;
string15 Cutscene : "GoingDown.exe", 0x26B55B;
}
init
{
if (modules.First().ModuleMemorySize == 0x79A726)
version = "v1";
else if (modules.First().ModuleMemorySize == 0x79B000)
version = "v2";
}
start
{
//return (old.Level == "M00_CIV_Intro_1" && current.Level == "M01_HOO_Tranes_Hood_1" && current.Loading != 0);
return (current.LevelFirst.Equals("M01_HOO_Tranes_Hood_1") && current.Loading != 0 && old.Loading == 0 || current.LevelSecond.Equals("M01_HOO_Tranes_Hood_1") && current.Loading != 0 && old.Loading == 00);
}
split
{
if (old.LevelFirst.Equals("M01_HOO_Tranes_Hood_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M01_HOO_Tranes_Hood_1", StringComparison.OrdinalIgnoreCase) || old.LevelSecond.Equals("M01_HOO_Tranes_Hood_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M01_HOO_Tranes_Hood_1", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M01_HOO_Tranes_Hood_1a", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M01_HOO_Tranes_Hood_1a", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M01_HOO_Tranes_Hood_1a", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M01_HOO_Tranes_Hood_1a", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M01_HOO_Tranes_Hood_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M01_HOO_Tranes_Hood_2", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M01_HOO_Tranes_Hood_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M01_HOO_Tranes_Hood_2", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M01_HOO_Tranes_Hood_3", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M01_HOO_Tranes_Hood_3", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M01_HOO_Tranes_Hood_3", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M01_HOO_Tranes_Hood_3", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M01_HOO_Tranes_Hood_4", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M01_HOO_Tranes_Hood_4", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M01_HOO_Tranes_Hood_4", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M01_HOO_Tranes_Hood_4", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M02_HOO_Subway_1a", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M02_HOO_Subway_1a", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M02_HOO_Subway_1a", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M02_HOO_Subway_1a", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M02_HOO_Subway_1b", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M02_HOO_Subway_1b", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M02_HOO_Subway_1b", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M02_HOO_Subway_1b", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("m02_hoo_subway_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m02_hoo_subway_2", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("m02_hoo_subway_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m02_hoo_subway_2", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("m02_hoo_subway_3", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m02_hoo_subway_3", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("m02_hoo_subway_3", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m02_hoo_subway_3", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("m03_hoo_whos_got_beef_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m03_hoo_whos_got_beef_1", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("m03_hoo_whos_got_beef_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m03_hoo_whos_got_beef_1", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("m03_hoo_whos_got_beef_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m03_hoo_whos_got_beef_2", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("m03_hoo_whos_got_beef_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m03_hoo_whos_got_beef_2", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("m03_hoo_whos_got_beef_3", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m03_hoo_whos_got_beef_3", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("m03_hoo_whos_got_beef_3", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m03_hoo_whos_got_beef_3", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("m03_hoo_whos_got_beef_4", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m03_hoo_whos_got_beef_4", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("m03_hoo_whos_got_beef_4", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m03_hoo_whos_got_beef_4", StringComparison.OrdinalIgnoreCase))
return true;
//if (old.LevelSecond.Equals("M04_HOO_Subway_layup_0", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M04_HOO_Subway_layup_0", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M04_HOO_Subway_layup_0", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M04_HOO_Subway_layup_0", StringComparison.OrdinalIgnoreCase))
// return true; (CUTSCENE NO NEED TO SPLIT)
if (old.LevelSecond.Equals("M04_HOO_Subway_layup_1a", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M04_HOO_Subway_layup_1a", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M04_HOO_Subway_layup_1a", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M04_HOO_Subway_layup_1a", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M04_HOO_Subway_layup_1b", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M04_HOO_Subway_layup_1b", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M04_HOO_Subway_layup_1b", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M04_HOO_Subway_layup_1b", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M04_HOO_Subway_layup_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M04_HOO_Subway_layup_2", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M04_HOO_Subway_layup_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M04_HOO_Subway_layup_2", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M05_HOO_Battle_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M05_HOO_Battle_1", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M05_HOO_Battle_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M05_HOO_Battle_1", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M05_HOO_Battle_3", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M05_HOO_Battle_3", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M05_HOO_Battle_3", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M05_HOO_Battle_3", StringComparison.OrdinalIgnoreCase))
return true;
//if (old.LevelSecond.Equals("M06_IND_Bulletproof_0") && current.LevelSecond.Equals(":M06_IND_Bulletproof_0", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M06_IND_Bulletproof_0", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M06_IND_Bulletproof_0", StringComparison.OrdinalIgnoreCase))
// return true; (CUTSCENE NO NEED TO SPLIT)
if (old.LevelSecond.Equals("m06_ind_bulletproof_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m06_ind_bulletproof_1", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("m06_ind_bulletproof_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m06_ind_bulletproof_1", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("m06_ind_bulletproof_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m06_ind_bulletproof_2", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("m06_ind_bulletproof_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m06_ind_bulletproof_2", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M06_IND_Bulletproof_3", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M06_IND_Bulletproof_3", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M06_IND_Bulletproof_3", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M06_IND_Bulletproof_3", StringComparison.OrdinalIgnoreCase))
return true;
//if (old.LevelSecond.Equals("M07_HOO_Blind_Justice_0") && current.LevelSecond.Equals(":M07_HOO_Blind_Justice_0", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M07_HOO_Blind_Justice_0", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M07_HOO_Blind_Justice_0", StringComparison.OrdinalIgnoreCase))
// return true; (CUTSCENE NO NEED TO SPLIT)
if (old.LevelSecond.Equals("M07_HOO_Blind_Justice_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M07_HOO_Blind_Justice_1", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M07_HOO_Blind_Justice_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M07_HOO_Blind_Justice_1", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M07_HOO_Blind_Justice_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M07_HOO_Blind_Justice_2", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M07_HOO_Blind_Justice_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M07_HOO_Blind_Justice_2", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M07_HOO_Blind_Justice_3", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M07_HOO_Blind_Justice_3", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M07_HOO_Blind_Justice_3", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M07_HOO_Blind_Justice_3", StringComparison.OrdinalIgnoreCase))
return true;
//if (old.LevelSecond.Equals("m08_hoo_remember_alamo_0") && current.LevelSecond.Equals(":m08_hoo_remember_alamo_0", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("m08_hoo_remember_alamo_0", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m08_hoo_remember_alamo_0", StringComparison.OrdinalIgnoreCase))
// return true; (CUTSCENE NO NEED TO SPLIT)
if (old.LevelSecond.Equals("m08_hoo_remember_alamo_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m08_hoo_remember_alamo_1", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("m08_hoo_remember_alamo_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m08_hoo_remember_alamo_1", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("m08_hoo_remember_alamo_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m08_hoo_remember_alamo_2", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("m08_hoo_remember_alamo_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m08_hoo_remember_alamo_2", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M08_HOO_Remember_Alamo_3", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M08_HOO_Remember_Alamo_3", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M08_HOO_Remember_Alamo_3", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M08_HOO_Remember_Alamo_3", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M09_CIV_Cat_and_Mouse_1a", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M09_CIV_Cat_and_Mouse_1a", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M09_CIV_Cat_and_Mouse_1a", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M09_CIV_Cat_and_Mouse_1a", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M09_CIV_Cat_and_Mouse_1b", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M09_CIV_Cat_and_Mouse_1b", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M09_CIV_Cat_and_Mouse_1b", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M09_CIV_Cat_and_Mouse_1b", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("m09_civ_cat_and_mouse_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m09_civ_cat_and_mouse_2", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("m09_civ_cat_and_mouse_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m09_civ_cat_and_mouse_2", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("m10_civ_bridge_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m10_civ_bridge_1", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("m10_civ_bridge_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m10_civ_bridge_1", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("m10_civ_bridge_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m10_civ_bridge_2", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("m10_civ_bridge_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":m10_civ_bridge_2", StringComparison.OrdinalIgnoreCase))
return true;
if (old.LevelSecond.Equals("M11_CIV_Blimp_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M11_CIV_Blimp_1", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M11_CIV_Blimp_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M11_CIV_Blimp_1", StringComparison.OrdinalIgnoreCase))
return true;
// NOT SURE IF IT WORKS
//if (old.LevelSecond.Equals("M11_CIV_Blimp_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M11_CIV_Blimp_2", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M01_HOO_Tranes_Hood_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M01_HOO_Tranes_Hood_1", StringComparison.OrdinalIgnoreCase))
// return true;
// Final split
if (current.Cutscene.Contains("M11_010") && current.Cutscene != old.Cutscene)
return true;
}
isLoading
{
return (current.Loading == 0);
}
我不知道如何处理那么多的if语句。 放在字典里吧? 但是后来我不知道该怎么做。
您正在将old.LevelFirst
和old.LevelSecond
与大量静态值进行比较,并进行不区分大小写的比较。 为什么不这样做,在您的split
方法的顶部,获取这些值的本地小写副本:
var first = old.LevelFirst.Lower();
var second = old.LevelSecond.Lower();
这使得比较更加容易,如下所示:
if(first == "..." || first == "..." || first == "..." || ...)
return true;
接下来,我认为您有一个错误。 您有if语句说:
if(first == "xxxx" && second == "yyyy" || second == "zzz")
return true;
如果second == "zzz"
无论first
为||
值如何,该语句将返回true。 优先级低于&&
。 您需要在second
比较中加上括号,即
if(first == "xxxx" && (second == "yyyy" || second == "zzz"))
return true;
接下来,看一下在第一级使用switch
语句而不是if
语句(确保与之比较的值是小写的):
switch(first)
{
case "m01_hoo_tranes_hood_1" :
return
(second == ":m01_hoo_tranes_hood_1") ||
(second == "m01_hoo_tranes_hood_1") ||
(second == ":m01_hoo_tranes_hood_1");
case "m01_hoo_tranes_hood_1" :
.....
}
这些是这里的逻辑更改-我假设如果first
是m01_hoo_tranes_hood_1
但不是second
值中的任何一个,那么该逻辑将一直m01_hoo_tranes_hood_1
到最后并返回false。 您的if
逻辑可以允许以后使用相同的first
值进行匹配,并具有不同的逻辑,但是无论如何都可以将其合并到上述case语句中。
最后,查看变量值。 冒号:
前缀是否相关?或者是否是“它们可能存在或可能不存在,所以我需要同时检查两者”的情况? 如果是这样,请返回这两个var first = / var = second =
语句,并删除:
前缀,这将减少比较:
if(first.StartsWith(":"))
first = first.Substring(1); // Remove first character
现在,您不需要在所有比较中都包含冒号前缀。
谢谢克里斯
据我所知,您可以通过执行类似的操作来减少大量代码
Func<string,string,bool> eq = (a,b) => a.Equals(b, StringComparison.OrdinalIgnoreCase);
var levels = new string[]
{
"M01_HOO_Tranes_Hood_1",
"M01_HOO_Tranes_Hood_1a",
"M01_HOO_Tranes_Hood_2",
"M01_HOO_Tranes_Hood_3",
"M01_HOO_Tranes_Hood_4",
"M02_HOO_Subway_1a",
"M02_HOO_Subway_1b",
"m02_hoo_subway_2",
"m02_hoo_subway_3",
"m03_hoo_whos_got_beef_1",
"m03_hoo_whos_got_beef_2",
"m03_hoo_whos_got_beef_3",
"m03_hoo_whos_got_beef_4",
"M04_HOO_Subway_layup_1a",
"M04_HOO_Subway_layup_1b",
"M04_HOO_Subway_layup_2",
"M05_HOO_Battle_1",
"M05_HOO_Battle_3",
"m06_ind_bulletproof_1",
"m06_ind_bulletproof_2",
"M06_IND_Bulletproof_3",
"M07_HOO_Blind_Justice_1",
"M07_HOO_Blind_Justice_2",
"M07_HOO_Blind_Justice_3",
"m08_hoo_remember_alamo_1",
"m08_hoo_remember_alamo_2",
"M08_HOO_Remember_Alamo_3",
"M09_CIV_Cat_and_Mouse_1a",
"M09_CIV_Cat_and_Mouse_1b",
"m09_civ_cat_and_mouse_2",
"m10_civ_bridge_1",
"m10_civ_bridge_2",
"M11_CIV_Blimp_1"
};
if(levels.Any((level) => eq(old.LevelFirst,level) && eq(current.LevelSecond, ":" + level) || eq(old.LevelSecond,level) && eq(current.LevelFirst, ":" + level)))
return true;
// NOT SURE IF IT WORKS
//if (old.LevelSecond.Equals("M11_CIV_Blimp_2", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M11_CIV_Blimp_2", StringComparison.OrdinalIgnoreCase) || old.LevelFirst.Equals("M01_HOO_Tranes_Hood_1", StringComparison.OrdinalIgnoreCase) && current.LevelSecond.Equals(":M01_HOO_Tranes_Hood_1", StringComparison.OrdinalIgnoreCase))
// return true;
// Final split
if (current.Cutscene.Contains("M11_010") && current.Cutscene != old.Cutscene)
return true;
但这真的更可读吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.