本文整理汇总了C#中Song.setDifficulty方法的典型用法代码示例。如果您正苦于以下问题:C# Song.setDifficulty方法的具体用法?C# Song.setDifficulty怎么用?C# Song.setDifficulty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Song
的用法示例。
在下文中一共展示了Song.setDifficulty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: readChart
//.........这里部分代码省略.........
//easy variable getted
theNewsong.title = title;
theNewsong.subtitle = subtitle;
theNewsong.artist = artist;
theNewsong.banner = banner;
theNewsong.offset = offset;
theNewsong.samplestart = samplestart;
theNewsong.samplelenght = samplelenght;
theNewsong.bpms = theBpmList;
theNewsong.stops = theStopList;
theNewsong.mesureBPMS = theBpmMesureList;
theNewsong.mesureSTOPS = theStopMesureList;
theNewsong.bpmToDisplay = thedisplayBPM;
/*if(files.FirstOrDefault(c => c.Contains(".ogg")) == null){
foreach(var fil in files){
Debug.Log(fil);
}
}*/
theNewsong.song = "file://" + files.FirstOrDefault(c => c.Contains(".ogg") || c.Contains(".OGG")).Replace('\\', '/');
//getting song information
int beginInformation = index;
string dl = "";
var theinfo = listLine.ElementAt(beginInformation + 1).Replace(":","").Trim();
if(theinfo.Contains("double")){
dl = "D";
}else
if(!theinfo.Contains("single") || theinfo.Contains("pump") || theinfo.Contains("ez2") ||
theinfo.Contains("para") || theinfo.Contains("ds3ddx") || theinfo.Contains("pnm") ||
theinfo.Contains("bm") || theinfo.Contains("maniax") || theinfo.Contains("techno")){
dl = "STOP";
}
theNewsong.stepartist = listLine.ElementAt(beginInformation + 2).Replace(":","").Trim();
theNewsong.setDifficulty(dl + listLine.ElementAt(beginInformation + 3).Replace(":","").Trim());
theNewsong.level = System.Convert.ToInt32(listLine.ElementAt(beginInformation + 4).Replace(":","").Trim());
//getting stepchart
int beginstepchart = beginInformation+6;
while(listLine.ElementAt(beginstepchart).Contains("//") ||
String.IsNullOrEmpty(listLine.ElementAt(beginstepchart).Trim()) ||
listLine.ElementAt(beginstepchart) == ""){
if(listLine.ElementAt(beginstepchart).Contains("NOTES")) dl = "STOP";
beginstepchart++;
}
if(listLine.ElementAt(beginstepchart).Contains("NOTES")) dl = "STOP";
//if(theNewsong.title == "The Last Kiss") Debug.Log(listLine.ElementAt(beginstepchart));
if(dl != "STOP"){
var numberOfSteps = 0;
var numberOfMines = 0;
var numberOfRoll = 0;
var numberOfFreezes = 0;
var numberOfJump = 0;
var numberOfStepsWJ = 0;
theNewsong.stepchart.Add(new List<string>());
for(int i = beginstepchart; !listLine.ElementAt(i).Contains(";"); i++){
if(listLine.ElementAt(i).Contains(",")){
theNewsong.stepchart.Add(new List<string>());
}else if(!String.IsNullOrEmpty(listLine.ElementAt(i))){
theNewsong.stepchart.Last().Add(listLine.ElementAt(i));
numberOfSteps += listLine.ElementAt(i).Count(c => c == '1');
numberOfSteps += listLine.ElementAt(i).Count(c => c == '2');
numberOfSteps += listLine.ElementAt(i).Count(c => c == '4');
numberOfFreezes += listLine.ElementAt(i).Count(c => c == '2');