private SpecialData Load(string filename) { Stream serializationStream = Cry.Decry(filename, 2); SpecialData specialData = (SpecialData) new BinaryFormatter().Deserialize(serializationStream); serializationStream.Close(); return(specialData); }
private SpecialData LoadSpecialData() { Stream serializationStream = Cry.Decry("Content\\Data\\8.xna", 2); SpecialData specialData = (SpecialData) new BinaryFormatter().Deserialize(serializationStream); serializationStream.Close(); return(specialData); }
private PlayData Load(string filename) { Stream serializationStream = Cry.Decry(filename, 2); PlayData playData = (PlayData) new BinaryFormatter().Deserialize(serializationStream); serializationStream.Close(); return(playData); }
private PlayData LoadPlayData() { Stream serializationStream = Cry.Decry("Content\\Data\\4.xna", 2); PlayData playData = (PlayData) new BinaryFormatter().Deserialize(serializationStream); serializationStream.Close(); return(playData); }
private void SavePracticeData(PracticeData data) { FileStream fileStream = new FileStream("Content\\Data\\5.xna", FileMode.Create); new BinaryFormatter().Serialize((Stream)fileStream, (object)data); fileStream.Close(); Cry.Encry("Content\\Data\\5.xna", 2); }
private PracticeData LoadPracticeData() { Stream serializationStream = Cry.Decry("Content\\Data\\5.xna", 2); PracticeData practiceData = (PracticeData) new BinaryFormatter().Deserialize(serializationStream); serializationStream.Close(); return(practiceData); }
private SaveData Load(string filename) { Stream serializationStream = Cry.Decry(filename, 3); SaveData saveData = (SaveData) new BinaryFormatter().Deserialize(serializationStream); serializationStream.Close(); if (saveData.rpy.Version == Main.rpyversion) { return(saveData); } return((SaveData)null); }
public Dialog( Sprite tex_s, Sprite dm_s, Sprite[] db_s, Sprite name_s, int stage, Cname c, int type, Boss b_b) { this.name = name_s; this.name.position = new Vector2(207f, 244f); this.colorm = this.colorb = 0.5f; this.now = this.now2 = -1; this.last = this.last2 = -1; this.b = b_b; this.sr = new StreamReader(Cry.Decry("Content/Data/d" + stage.ToString() + type.ToString() + ((int)c).ToString() + ".xna", 2)); this.n = this.sr.ReadLine(); if (this.n == "PAUSE") { this.next = true; this.time = 10; } else { string str = this.n.Split(']')[0].Remove(0, 1); if (str.Length != 2) { this.now = int.Parse(str[0].ToString()); this.now2 = -1; } else { this.now = int.Parse(str[0].ToString()); this.now2 = int.Parse(str[1].ToString()); } } this.dm = dm_s; this.dm.color.a = 0.0f; this.db = db_s; for (int index = 0; index < this.db.Length; ++index) { this.db[index].color.a = 0.0f; } this.left = new Vector2(-30f, 92f); this.right = new Vector2(210f, 92f); this.tex = tex_s; this.tex.color.a = 0.0f; this.tex.origin = new Vector2(195f, 60f); this.tex.position = new Vector2(224f, 400f); Program.game.game.Drawevents += new Game.DrawDelegate(this.Draw); }
private void Save() { Program.game.PlaySound("extend"); this.rpys[this.page * 15 + this.selection].SetName(this.nametemp); this.data.rpy = this.rpys[this.page * 15 + this.selection]; string str = "Replay\\thmhj_" + (this.page * 15 + this.selection).ToString().PadLeft(2, '0') + ".rpy"; FileStream fileStream = File.Open(str, FileMode.Create); new BinaryFormatter().Serialize((Stream)fileStream, (object)this.data); fileStream.Close(); Cry.Encry(str, 3); this.step = false; this.start = false; Main.nametemp = this.nametemp; this.nametemp = ""; }
protected override void LoadContent() { try { Cry.Key = "NYLilMS35bt1RuSa47uRvO1FCYgPVq"; Cry.Vector = "KU4Tn93FEoYca"; this.spriteBatch = new NSpriteBatch(this.GraphicsDevice); this.screen = Texture2D.FromFile(this.GraphicsDevice, Cry.Decry("Content\\Graphics\\Pattern\\screen.xna", 0)); this.achivmanager = new AchievementManager(Texture2D.FromFile(this.GraphicsDevice, Cry.Decry("Content\\Graphics\\Info\\achivboard.xna", 0))); } catch (Exception ex) { StreamWriter streamWriter = new StreamWriter("Error.txt"); DateTime now = DateTime.Now; streamWriter.Write("[" + now.Hour.ToString("00") + ":" + now.Minute.ToString("00") + ":" + now.Second.ToString("00") + "]\n" + ex.ToString()); streamWriter.Close(); Main.Message(ex.ToString()); } }
public static byte[] Encry(string FileName, int type) { TripleDESCryptoServiceProvider cryptoServiceProvider1 = new TripleDESCryptoServiceProvider(); MD5CryptoServiceProvider cryptoServiceProvider2 = new MD5CryptoServiceProvider(); cryptoServiceProvider1.Key = cryptoServiceProvider2.ComputeHash(Cry.Keys()[type]); cryptoServiceProvider1.Mode = CipherMode.ECB; ICryptoTransform encryptor = cryptoServiceProvider1.CreateEncryptor(); byte[] inputBuffer = File.ReadAllBytes(FileName); byte[] buffer = encryptor.TransformFinalBlock(inputBuffer, 0, inputBuffer.Length); FileStream fileStream = type == 3 ? File.Create(Cry.Cuts(FileName, ".", 1) + ".rpy") : File.Create(Cry.Cuts(FileName, ".", 1) + ".xna"); fileStream.Write(buffer, 0, buffer.GetLength(0)); fileStream.Close(); return(buffer); }
private string[][] LoadAchievementList() { StreamReader streamReader = new StreamReader(Cry.Decry("Content/Data/9.xna", 2)); string[][] strArray = new string[3][]; int index1 = 0; while (!streamReader.EndOfStream) { int length = int.Parse(streamReader.ReadLine()); strArray[index1] = new string[length]; for (int index2 = 0; index2 < length; ++index2) { strArray[index1][index2] = streamReader.ReadLine().Split(":".ToCharArray())[0]; } ++index1; } return(strArray); }
private string[][] LoadAchievementList(string filename) { StreamReader streamReader = new StreamReader(Cry.Decry(filename, 2)); string[][] strArray = new string[3][]; int index1 = 0; while (!streamReader.EndOfStream) { int length = int.Parse(streamReader.ReadLine()); strArray[index1] = new string[length]; for (int index2 = 0; index2 < length; ++index2) { strArray[index1][index2] = streamReader.ReadLine(); } ++index1; } return(strArray); }
public BGM(Texture2D t, int id) { this.tex = new Sprite(t); this.tex.position = new Vector2(91f, 479f); this.tex.rect = id < 15 ? new Rectangle(0, (id - 2) * 26, 326, 26) : new Rectangle(0, (id - 3) * 26, 326, 26); Music.BGM = Music.SB.GetCue(id.ToString()); StreamReader streamReader = new StreamReader(Cry.Decry("Content/Music/00.xna", 2)); streamReader.ReadLine(); int num = int.Parse(streamReader.ReadLine()); streamReader.Close(); if (num < id - 1) { StreamWriter streamWriter = new StreamWriter("Content/Music/00.xna", false); streamWriter.WriteLine("Fantasy Danmaku Festival"); streamWriter.WriteLine((id - 1).ToString()); streamWriter.Close(); Cry.Encry("Content/Music/00.xna", 2); } Program.game.game.Drawevents += new Game.DrawDelegate(this.Draw); BGM.bgm = this; }
private string[] LoadSpellCardList(string filename) { StreamReader streamReader = new StreamReader(Cry.Decry(filename, 2)); string[] strArray1 = new string[7]; for (int index = 0; index < 7; ++index) { strArray1[index] = ""; } int num1 = 0; while (!streamReader.EndOfStream) { int num2 = int.Parse(streamReader.ReadLine()); for (int index1 = 0; index1 < num2; ++index1) { string[] strArray2; IntPtr index2; (strArray2 = strArray1)[(int)(index2 = (IntPtr)num1)] = strArray2[(int)index2] + streamReader.ReadLine() + "^"; } ++num1; } return(strArray1); }
public static void initialize(GraphicsDevice g) { PraticleManager.practile = Texture2D.FromFile(g, Cry.Decry("Content/Graphics/List/praticle.xna", 0)); }
public CrazyStorm( GraphicsDevice g, CSManager csm_c, bool bansound_b, string filename, Vector2 Player) { shoot = new List <byte>(); id = filename; bgset = new List <BarrageType>(); csm = csm_c; bansound = bansound_b; layerm = new LayerManager(); center = new Center(); time = new Time(csm, this, layerm); StreamReader streamReader = new StreamReader(Cry.Decry("Content/Data/" + filename + ".xna", 0)); if (streamReader.ReadLine() == "Crazy Storm Data 1.01") { string source = streamReader.ReadLine(); if (File.Exists("Content/Data/" + filename + ".dat")) { tex = Texture2D.FromFile(g, Cry.Decry("Content/Data/" + filename + ".dat", 0)); } if (source.Contains("Types")) { int num = int.Parse(source.Split(' ')[0]); for (int index = 0; index < num; ++index) { string str = streamReader.ReadLine(); BarrageType barrageType = new BarrageType { name = str.Split('_')[0], rect = new Rectangle(int.Parse(str.Split('_')[1]), int.Parse(str.Split('_')[2]), int.Parse(str.Split('_')[3]), int.Parse(str.Split('_')[4])), origin = new Vector2(int.Parse(str.Split('_')[5]), int.Parse(str.Split('_')[6])), origin0 = new Vector2(int.Parse(str.Split('_')[5]), int.Parse(str.Split('_')[6])), pdr0 = int.Parse(str.Split('_')[7]) }; if (str.Split('_')[8] != "") { barrageType.color = int.Parse(str.Split('_')[8]); } else { barrageType.color = -1; } bgset.Add(barrageType); } source = streamReader.ReadLine(); } if (source.Contains("GlobalEvents")) { int num1 = int.Parse(source.Split(' ')[0]); for (int index = 0; index < num1; ++index) { string str = streamReader.ReadLine(); time.GEcount.Add(int.Parse(str.Split('_')[0]) - 1); GlobalEvent globalEvent = new GlobalEvent { gotocondition = int.Parse(str.Split('_')[1]), gotoopreator = str.Split('_')[2], gotocvalue = int.Parse(str.Split('_')[3]), isgoto = (bool.Parse(str.Split('_')[4]) ? 1 : 0) != 0, gototime = int.Parse(str.Split('_')[5]), gotowhere = int.Parse(str.Split('_')[6]), quakecondition = int.Parse(str.Split('_')[7]), quakeopreator = str.Split('_')[8], quakecvalue = int.Parse(str.Split('_')[9]), isquake = (bool.Parse(str.Split('_')[10]) ? 1 : 0) != 0, quaketime = int.Parse(str.Split('_')[11]), quakelevel = int.Parse(str.Split('_')[12]), stopcondition = int.Parse(str.Split('_')[13]), stopopreator = str.Split('_')[14], stopcvalue = int.Parse(str.Split('_')[15]), isstop = (bool.Parse(str.Split('_')[16]) ? 1 : 0) != 0, stoptime = int.Parse(str.Split('_')[17]), stoplevel = int.Parse(str.Split('_')[18]) }; if (time.GE.Count < int.Parse(str.Split('_')[0])) { int num2 = 0; while (true) { if (num2 < int.Parse(str.Split('_')[0])) { time.GE.Add(new GlobalEvent() { gotocondition = -1, quakecondition = -1, stopcondition = -1, stoplevel = -1 }); ++num2; } else { break; } } } time.GE[int.Parse(str.Split('_')[0]) - 1] = globalEvent; } source = streamReader.ReadLine(); } if (source.Contains("Sounds")) { int num = int.Parse(source.Split(' ')[0]); for (int index = 0; index < num; ++index) { string str = streamReader.ReadLine(); csm.bgset[int.Parse(str.Split('_')[0]) - 1].sound = str.Split('_')[1]; } source = streamReader.ReadLine(); } if (source.Contains(',')) { center.Available = true; center.x = float.Parse(source.Split(':')[1].Split(',')[0]); center.y = float.Parse(source.Split(':')[1].Split(',')[1]); if (source.Split(':')[1].Split(',').Length >= 7) { center.speed = float.Parse(source.Split(':')[1].Split(',')[2]); center.speedd = float.Parse(source.Split(':')[1].Split(',')[3]); center.aspeed = float.Parse(source.Split(':')[1].Split(',')[4]); center.aspeedd = float.Parse(source.Split(':')[1].Split(',')[5]); int index = 0; while (true) { if (index < source.Split(':')[1].Split(',')[6].Split(';').Length - 1) { center.events.Add(source.Split(':')[1].Split(',')[6].Split(';')[index]); ++index; } else { break; } } } } else { center.Available = false; } time.total = int.Parse(streamReader.ReadLine().Split(',')[0].Split(':')[1]); for (int index1 = 0; index1 < 4; ++index1) { string str1 = streamReader.ReadLine(); if (str1.Split(':')[1].Split(',')[0] != "empty") { Layer layer = new Layer(layerm, int.Parse(str1.Split(':')[1].Split(',')[1]), int.Parse(str1.Split(':')[1].Split(',')[2])); int num1 = int.Parse(str1.Split(':')[1].Split(',')[3]); for (int index2 = 0; index2 < num1; ++index2) { string str2 = streamReader.ReadLine(); Batch batch = new Batch(float.Parse(str2.Split(',')[6]), float.Parse(str2.Split(',')[7]), layerm) { id = int.Parse(str2.Split(',')[0]), parentid = int.Parse(str2.Split(',')[1]), Binding = (bool.Parse(str2.Split(',')[2]) ? 1 : 0) != 0, bindid = int.Parse(str2.Split(',')[3]), Bindwithspeedd = (bool.Parse(str2.Split(',')[4]) ? 1 : 0) != 0, begin = int.Parse(str2.Split(',')[8]), life = int.Parse(str2.Split(',')[9]), fx = float.Parse(str2.Split(',')[10]), fy = float.Parse(str2.Split(',')[11]), r = int.Parse(str2.Split(',')[12]), rdirection = float.Parse(str2.Split(',')[13]) }; string str3 = str2.Split(',')[14].Replace("{", "").Replace("}", ""); batch.rdirections.X = float.Parse(str3.Split(' ')[0].Split(':')[1]); batch.rdirections.Y = float.Parse(str3.Split(' ')[1].Split(':')[1]); batch.tiao = int.Parse(str2.Split(',')[15]); batch.t = int.Parse(str2.Split(',')[16]); batch.fdirection = float.Parse(str2.Split(',')[17]); string str4 = str2.Split(',')[18].Replace("{", "").Replace("}", ""); batch.fdirections.X = float.Parse(str4.Split(' ')[0].Split(':')[1]); batch.fdirections.Y = float.Parse(str4.Split(' ')[1].Split(':')[1]); batch.range = int.Parse(str2.Split(',')[19]); batch.speed = float.Parse(str2.Split(',')[20]); batch.speedd = float.Parse(str2.Split(',')[21]); string str5 = str2.Split(',')[22].Replace("{", "").Replace("}", ""); batch.speedds.X = float.Parse(str5.Split(' ')[0].Split(':')[1]); batch.speedds.Y = float.Parse(str5.Split(' ')[1].Split(':')[1]); batch.aspeed = float.Parse(str2.Split(',')[23]); batch.aspeedd = float.Parse(str2.Split(',')[24]); string str6 = str2.Split(',')[25].Replace("{", "").Replace("}", ""); batch.aspeedds.X = float.Parse(str6.Split(' ')[0].Split(':')[1]); batch.aspeedds.Y = float.Parse(str6.Split(' ')[1].Split(':')[1]); batch.sonlife = int.Parse(str2.Split(',')[26]); batch.type = int.Parse(str2.Split(',')[27]); batch.wscale = float.Parse(str2.Split(',')[28]); batch.hscale = float.Parse(str2.Split(',')[29]); batch.colorR = int.Parse(str2.Split(',')[30]); batch.colorG = int.Parse(str2.Split(',')[31]); batch.colorB = int.Parse(str2.Split(',')[32]); batch.alpha = int.Parse(str2.Split(',')[33]); batch.head = float.Parse(str2.Split(',')[34]); string str7 = str2.Split(',')[35].Replace("{", "").Replace("}", ""); batch.heads.X = float.Parse(str7.Split(' ')[0].Split(':')[1]); batch.heads.Y = float.Parse(str7.Split(' ')[1].Split(':')[1]); batch.Withspeedd = (bool.Parse(str2.Split(',')[36]) ? 1 : 0) != 0; batch.sonspeed = float.Parse(str2.Split(',')[37]); batch.sonspeedd = float.Parse(str2.Split(',')[38]); string str8 = str2.Split(',')[39].Replace("{", "").Replace("}", ""); batch.sonspeedds.X = float.Parse(str8.Split(' ')[0].Split(':')[1]); batch.sonspeedds.Y = float.Parse(str8.Split(' ')[1].Split(':')[1]); batch.sonaspeed = float.Parse(str2.Split(',')[40]); batch.sonaspeedd = float.Parse(str2.Split(',')[41]); string str9 = str2.Split(',')[42].Replace("{", "").Replace("}", ""); batch.sonaspeedds.X = float.Parse(str9.Split(' ')[0].Split(':')[1]); batch.sonaspeedds.Y = float.Parse(str9.Split(' ')[1].Split(':')[1]); batch.xscale = float.Parse(str2.Split(',')[43]); batch.yscale = float.Parse(str2.Split(',')[44]); batch.Mist = (bool.Parse(str2.Split(',')[45]) ? 1 : 0) != 0; batch.Dispel = (bool.Parse(str2.Split(',')[46]) ? 1 : 0) != 0; batch.Blend = (bool.Parse(str2.Split(',')[47]) ? 1 : 0) != 0; batch.Afterimage = (bool.Parse(str2.Split(',')[48]) ? 1 : 0) != 0; batch.Outdispel = (bool.Parse(str2.Split(',')[49]) ? 1 : 0) != 0; batch.Invincible = (bool.Parse(str2.Split(',')[50]) ? 1 : 0) != 0; string str10 = str2.Split(',')[51]; int idx1 = 0; while (true) { if (idx1 < str10.Split('&').Length - 1) { string str11 = str10.Split('&')[idx1]; Event @event = new Event(idx1) { tag = str11.Split('|')[0], t = int.Parse(str11.Split('|')[1]), addtime = int.Parse(str11.Split('|')[2]) }; int index3 = 0; while (true) { if (index3 < str11.Split('|')[3].Split(';').Length - 1) { @event.events.Add(str11.Split('|')[3].Split(';')[index3]); ++index3; } else { break; } } batch.Parentevents.Add(@event); ++idx1; } else { break; } } string str12 = str2.Split(',')[52]; int idx2 = 0; while (true) { if (idx2 < str12.Split('&').Length - 1) { string str11 = str12.Split('&')[idx2]; Event @event = new Event(idx2) { tag = str11.Split('|')[0], t = int.Parse(str11.Split('|')[1]), addtime = int.Parse(str11.Split('|')[2]) }; int index3 = 0; while (true) { if (index3 < str11.Split('|')[3].Split(';').Length - 1) { @event.events.Add(str11.Split('|')[3].Split(';')[index3]); ++index3; } else { break; } } batch.Sonevents.Add(@event); ++idx2; } else { break; } } batch.rand.fx = float.Parse(str2.Split(',')[53]); batch.rand.fy = float.Parse(str2.Split(',')[54]); batch.rand.r = int.Parse(str2.Split(',')[55]); batch.rand.rdirection = float.Parse(str2.Split(',')[56]); batch.rand.tiao = int.Parse(str2.Split(',')[57]); batch.rand.t = int.Parse(str2.Split(',')[58]); batch.rand.fdirection = float.Parse(str2.Split(',')[59]); batch.rand.range = int.Parse(str2.Split(',')[60]); batch.rand.speed = float.Parse(str2.Split(',')[61]); batch.rand.speedd = float.Parse(str2.Split(',')[62]); batch.rand.aspeed = float.Parse(str2.Split(',')[63]); batch.rand.aspeedd = float.Parse(str2.Split(',')[64]); batch.rand.head = float.Parse(str2.Split(',')[65]); batch.rand.sonspeed = float.Parse(str2.Split(',')[66]); batch.rand.sonspeedd = float.Parse(str2.Split(',')[67]); batch.rand.sonaspeed = float.Parse(str2.Split(',')[68]); batch.rand.sonaspeedd = float.Parse(str2.Split(',')[69]); if (str2.Split(',').Length >= 72) { batch.Cover = (bool.Parse(str2.Split(',')[70]) ? 1 : 0) != 0; batch.Rebound = (bool.Parse(str2.Split(',')[71]) ? 1 : 0) != 0; batch.Force = (bool.Parse(str2.Split(',')[72]) ? 1 : 0) != 0; } if (str2.Split(',').Length >= 74) { batch.Deepbind = (bool.Parse(str2.Split(',')[73]) ? 1 : 0) != 0; } layerm.LayerArray[index1].BatchArray.Add(batch); } if (str1.Split(':')[1].Split(',').Length >= 7) { int num2 = int.Parse(str1.Split(':')[1].Split(',')[4]); for (int index2 = 0; index2 < num2; ++index2) { string str2 = streamReader.ReadLine(); Lase lase = new Lase(float.Parse(str2.Split(',')[6]), float.Parse(str2.Split(',')[7]), layerm) { id = int.Parse(str2.Split(',')[0]), parentid = int.Parse(str2.Split(',')[1]), Binding = (bool.Parse(str2.Split(',')[2]) ? 1 : 0) != 0, bindid = int.Parse(str2.Split(',')[3]), Bindwithspeedd = (bool.Parse(str2.Split(',')[4]) ? 1 : 0) != 0, begin = int.Parse(str2.Split(',')[8]), life = int.Parse(str2.Split(',')[9]), r = int.Parse(str2.Split(',')[10]), rdirection = float.Parse(str2.Split(',')[11]) }; string str3 = str2.Split(',')[12].Replace("{", "").Replace("}", ""); lase.rdirections.X = float.Parse(str3.Split(' ')[0].Split(':')[1]); lase.rdirections.Y = float.Parse(str3.Split(' ')[1].Split(':')[1]); lase.tiao = int.Parse(str2.Split(',')[13]); lase.t = int.Parse(str2.Split(',')[14]); lase.fdirection = float.Parse(str2.Split(',')[15]); string str4 = str2.Split(',')[16].Replace("{", "").Replace("}", ""); lase.fdirections.X = float.Parse(str4.Split(' ')[0].Split(':')[1]); lase.fdirections.Y = float.Parse(str4.Split(' ')[1].Split(':')[1]); lase.range = int.Parse(str2.Split(',')[17]); lase.speed = float.Parse(str2.Split(',')[18]); lase.speedd = float.Parse(str2.Split(',')[19]); string str5 = str2.Split(',')[20].Replace("{", "").Replace("}", ""); lase.speedds.X = float.Parse(str5.Split(' ')[0].Split(':')[1]); lase.speedds.Y = float.Parse(str5.Split(' ')[1].Split(':')[1]); lase.aspeed = float.Parse(str2.Split(',')[21]); lase.aspeedd = float.Parse(str2.Split(',')[22]); string str6 = str2.Split(',')[23].Replace("{", "").Replace("}", ""); lase.aspeedds.X = float.Parse(str6.Split(' ')[0].Split(':')[1]); lase.aspeedds.Y = float.Parse(str6.Split(' ')[1].Split(':')[1]); lase.sonlife = int.Parse(str2.Split(',')[24]); lase.type = int.Parse(str2.Split(',')[25]); lase.wscale = float.Parse(str2.Split(',')[26]); lase.longs = float.Parse(str2.Split(',')[27]); lase.alpha = int.Parse(str2.Split(',')[28]); lase.Ray = (bool.Parse(str2.Split(',')[29]) ? 1 : 0) != 0; lase.sonspeed = float.Parse(str2.Split(',')[30]); lase.sonspeedd = float.Parse(str2.Split(',')[31]); string str7 = str2.Split(',')[32].Replace("{", "").Replace("}", ""); lase.sonspeedds.X = float.Parse(str7.Split(' ')[0].Split(':')[1]); lase.sonspeedds.Y = float.Parse(str7.Split(' ')[1].Split(':')[1]); lase.sonaspeed = float.Parse(str2.Split(',')[33]); lase.sonaspeedd = float.Parse(str2.Split(',')[34]); string str8 = str2.Split(',')[35].Replace("{", "").Replace("}", ""); lase.sonaspeedds.X = float.Parse(str8.Split(' ')[0].Split(':')[1]); lase.sonaspeedds.Y = float.Parse(str8.Split(' ')[1].Split(':')[1]); lase.xscale = float.Parse(str2.Split(',')[36]); lase.yscale = float.Parse(str2.Split(',')[37]); lase.Blend = (bool.Parse(str2.Split(',')[38]) ? 1 : 0) != 0; lase.Outdispel = (bool.Parse(str2.Split(',')[39]) ? 1 : 0) != 0; lase.Invincible = (bool.Parse(str2.Split(',')[40]) ? 1 : 0) != 0; string str9 = str2.Split(',')[42]; int idx1 = 0; while (true) { if (idx1 < str9.Split('&').Length - 1) { string str10 = str9.Split('&')[idx1]; Event @event = new Event(idx1) { tag = str10.Split('|')[0], t = int.Parse(str10.Split('|')[1]), addtime = int.Parse(str10.Split('|')[2]) }; int index3 = 0; while (true) { if (index3 < str10.Split('|')[3].Split(';').Length - 1) { @event.events.Add(str10.Split('|')[3].Split(';')[index3]); ++index3; } else { break; } } lase.Parentevents.Add(@event); ++idx1; } else { break; } } string str11 = str2.Split(',')[43]; int idx2 = 0; while (true) { if (idx2 < str11.Split('&').Length - 1) { string str10 = str11.Split('&')[idx2]; Event @event = new Event(idx2) { tag = str10.Split('|')[0], t = int.Parse(str10.Split('|')[1]), addtime = int.Parse(str10.Split('|')[2]) }; int index3 = 0; while (true) { if (index3 < str10.Split('|')[3].Split(';').Length - 1) { @event.events.Add(str10.Split('|')[3].Split(';')[index3]); ++index3; } else { break; } } lase.Sonevents.Add(@event); ++idx2; } else { break; } } lase.rand.r = int.Parse(str2.Split(',')[44]); lase.rand.rdirection = float.Parse(str2.Split(',')[45]); lase.rand.tiao = int.Parse(str2.Split(',')[46]); lase.rand.t = int.Parse(str2.Split(',')[47]); lase.rand.fdirection = float.Parse(str2.Split(',')[48]); lase.rand.range = int.Parse(str2.Split(',')[49]); lase.rand.speed = float.Parse(str2.Split(',')[50]); lase.rand.speedd = float.Parse(str2.Split(',')[51]); lase.rand.aspeed = float.Parse(str2.Split(',')[52]); lase.rand.aspeedd = float.Parse(str2.Split(',')[53]); lase.rand.sonspeed = float.Parse(str2.Split(',')[54]); lase.rand.sonspeedd = float.Parse(str2.Split(',')[55]); lase.rand.sonaspeed = float.Parse(str2.Split(',')[56]); lase.rand.sonaspeedd = float.Parse(str2.Split(',')[57]); if (str2.Split(',').Length >= 59) { lase.Deepbind = (bool.Parse(str2.Split(',')[58]) ? 1 : 0) != 0; } layerm.LayerArray[index1].LaseArray.Add(lase); } int num3 = int.Parse(str1.Split(':')[1].Split(',')[5]); for (int index2 = 0; index2 < num3; ++index2) { string str2 = streamReader.ReadLine(); Cover cover = new Cover(float.Parse(str2.Split(',')[2]), float.Parse(str2.Split(',')[3]), layerm) { id = int.Parse(str2.Split(',')[0]), parentid = int.Parse(str2.Split(',')[1]), begin = int.Parse(str2.Split(',')[4]), life = int.Parse(str2.Split(',')[5]), halfw = int.Parse(str2.Split(',')[6]), halfh = int.Parse(str2.Split(',')[7]), Circle = (bool.Parse(str2.Split(',')[8]) ? 1 : 0) != 0, type = int.Parse(str2.Split(',')[9]), controlid = int.Parse(str2.Split(',')[10]), speed = float.Parse(str2.Split(',')[11]), speedd = float.Parse(str2.Split(',')[12]) }; string str3 = str2.Split(',')[13].Replace("{", "").Replace("}", ""); cover.speedds.X = float.Parse(str3.Split(' ')[0].Split(':')[1]); cover.speedds.Y = float.Parse(str3.Split(' ')[1].Split(':')[1]); cover.aspeed = float.Parse(str2.Split(',')[14]); cover.aspeedd = float.Parse(str2.Split(',')[15]); string str4 = str2.Split(',')[16].Replace("{", "").Replace("}", ""); cover.aspeedds.X = float.Parse(str4.Split(' ')[0].Split(':')[1]); cover.aspeedds.Y = float.Parse(str4.Split(' ')[1].Split(':')[1]); string str5 = str2.Split(',')[17]; int idx1 = 0; while (true) { if (idx1 < str5.Split('&').Length - 1) { string str6 = str5.Split('&')[idx1]; Event @event = new Event(idx1) { tag = str6.Split('|')[0], t = int.Parse(str6.Split('|')[1]), addtime = int.Parse(str6.Split('|')[2]) }; int index3 = 0; while (true) { if (index3 < str6.Split('|')[3].Split(';').Length - 1) { @event.events.Add(str6.Split('|')[3].Split(';')[index3]); ++index3; } else { break; } } cover.Parentevents.Add(@event); ++idx1; } else { break; } } string str7 = str2.Split(',')[18]; int idx2 = 0; while (true) { if (idx2 < str7.Split('&').Length - 1) { string str6 = str7.Split('&')[idx2]; Event @event = new Event(idx2) { tag = str6.Split('|')[0], t = int.Parse(str6.Split('|')[1]), addtime = int.Parse(str6.Split('|')[2]) }; int index3 = 0; while (true) { if (index3 < str6.Split('|')[3].Split(';').Length - 1) { @event.events.Add(str6.Split('|')[3].Split(';')[index3]); ++index3; } else { break; } } cover.Sonevents.Add(@event); ++idx2; } else { break; } } cover.rand.speed = float.Parse(str2.Split(',')[19]); cover.rand.speedd = float.Parse(str2.Split(',')[20]); cover.rand.aspeed = float.Parse(str2.Split(',')[21]); cover.rand.aspeedd = float.Parse(str2.Split(',')[22]); if (str2.Split(',').Length >= 24) { cover.bindid = int.Parse(str2.Split(',')[23]); } if (str2.Split(',').Length >= 25) { if (str2.Split(',')[24] != "") { cover.Deepbind = (bool.Parse(str2.Split(',')[24]) ? 1 : 0) != 0; } } layerm.LayerArray[index1].CoverArray.Add(cover); } int num4 = int.Parse(str1.Split(':')[1].Split(',')[6]); for (int index2 = 0; index2 < num4; ++index2) { string str2 = streamReader.ReadLine(); Rebound rebound = new Rebound(float.Parse(str2.Split(',')[2]), float.Parse(str2.Split(',')[3]), layerm) { id = int.Parse(str2.Split(',')[0]), parentid = int.Parse(str2.Split(',')[1]), begin = int.Parse(str2.Split(',')[4]), life = int.Parse(str2.Split(',')[5]), longs = int.Parse(str2.Split(',')[6]), angle = int.Parse(str2.Split(',')[7]), time = int.Parse(str2.Split(',')[8]), speed = float.Parse(str2.Split(',')[9]), speedd = float.Parse(str2.Split(',')[10]), aspeed = float.Parse(str2.Split(',')[11]), aspeedd = float.Parse(str2.Split(',')[12]) }; string str3 = str2.Split(',')[13]; int idx = 0; while (true) { if (idx < str3.Split('&').Length - 1) { string str4 = str3.Split('&')[idx]; rebound.Parentevents.Add(new Event(idx) { tag = str4 }); ++idx; } else { break; } } rebound.rand.speed = float.Parse(str2.Split(',')[14]); rebound.rand.speedd = float.Parse(str2.Split(',')[15]); rebound.rand.aspeed = float.Parse(str2.Split(',')[16]); rebound.rand.aspeedd = float.Parse(str2.Split(',')[17]); layerm.LayerArray[index1].ReboundArray.Add(rebound); } int num5 = int.Parse(str1.Split(':')[1].Split(',')[7]); for (int index2 = 0; index2 < num5; ++index2) { string str2 = streamReader.ReadLine(); layerm.LayerArray[index1].ForceArray.Add(new Force(float.Parse(str2.Split(',')[2]), float.Parse(str2.Split(',')[3]), layerm) { id = int.Parse(str2.Split(',')[0]), parentid = int.Parse(str2.Split(',')[1]), begin = int.Parse(str2.Split(',')[4]), life = int.Parse(str2.Split(',')[5]), halfw = int.Parse(str2.Split(',')[6]), halfh = int.Parse(str2.Split(',')[7]), Circle = (bool.Parse(str2.Split(',')[8]) ? 1 : 0) != 0, type = int.Parse(str2.Split(',')[9]), controlid = int.Parse(str2.Split(',')[10]), speed = float.Parse(str2.Split(',')[11]), speedd = float.Parse(str2.Split(',')[12]), aspeed = float.Parse(str2.Split(',')[13]), aspeedd = float.Parse(str2.Split(',')[14]), addaspeed = float.Parse(str2.Split(',')[15]), addaspeedd = float.Parse(str2.Split(',')[16]), Suction = (bool.Parse(str2.Split(',')[17]) ? 1 : 0) != 0, Repulsion = (bool.Parse(str2.Split(',')[18]) ? 1 : 0) != 0, addspeed = float.Parse(str2.Split(',')[19]), rand = { speed = float.Parse(str2.Split(',')[20]), speedd = float.Parse(str2.Split(',')[21]), aspeed = float.Parse(str2.Split(',')[22]), aspeedd = float.Parse(str2.Split(',')[23]) } }); } } } } } time.Init(Player); }
public void Update() { if (!this.ifcontinued || this.edtype == 4) { if (this.time == 120) { Music.BGM = Music.SB.GetCue("14"); Music.BGM.Play(); StreamReader streamReader = new StreamReader(Cry.Decry("Content/Music/00.xna", 2)); streamReader.ReadLine(); int num = int.Parse(streamReader.ReadLine()); streamReader.Close(); if (num < 13) { StreamWriter streamWriter = new StreamWriter("Content/Music/00.xna", false); streamWriter.WriteLine("Fantasy Danmaku Festival"); streamWriter.WriteLine(13.ToString()); streamWriter.Close(); Cry.Encry("Content/Music/00.xna", 2); } this.praticle1.Start(); } else if (this.time > 180 && this.time <= 380) { this.textcolor[0] += 0.005f; } else if (this.time > 600 && this.time <= 800) { this.textcolor[1] += 0.005f; } else if (this.time > 1020 && this.time <= 1220) { this.textcolor[2] += 0.005f; } else if (this.time > 1440 && this.time <= 1640) { this.textcolor[3] += 0.005f; } else if (this.time > 1740 && this.time <= 1800) { this.whitecolor += 0.01666667f; } else if (this.time > 1820 && this.time <= 1840) { this.background[0].color.a += 0.05f; this.background[0].scale += new Vector2((float)((0.800000011920929 - (double)this.background[0].scale.X) / 15.0), (float)((0.800000011920929 - (double)this.background[0].scale.Y) / 15.0)); this.logo.color.a += 0.05f; this.logo.scale += new Vector2((float)((0.699999988079071 - (double)this.logo.scale.X) / 20.0), (float)((0.699999988079071 - (double)this.logo.scale.Y) / 20.0)); } else if (this.time > 1840 && this.time <= 2200) { this.background[0].scale -= new Vector2(0.00065f, 0.00065f); this.logo.scale -= new Vector2(0.0003f, 0.0003f); if (this.time > 2020 && this.time <= 2040) { this.end.color.a += 0.05f; } if (this.time == 2200) { this.praticle1.Stop(); } } else if (this.time > 2200 && this.time <= 2250) { this.background[0].position.X += (float)((0.0 - (double)this.background[0].position.X) / 40.0); this.logo.color.a -= 0.05f; if ((double)this.logo.color.a <= 0.0) { this.logo.color.a = 0.0f; } this.end.color.a -= 0.02f; this.black.position.X += (float)((182.0 - (double)this.black.position.X) / 15.0); this.black.color.a = 1f; } else if (this.time > 2260 && this.time <= 2670) { if (this.time == 2300) { this.praticle1 = (SimplePraticleActor)null; } this.background[0].position.X += 0.1f; this.staff[0].color.a += 0.01f; if ((double)this.staff[0].color.a >= 1.0) { this.staff[0].color.a = 1f; } } else if (this.time > 2670 && this.time <= 3080) { this.background[0].position.X += 0.1f; this.background[1].position = this.background[0].position; this.background[1].scale = this.background[0].scale; this.background[1].color.a += 0.005f; if ((double)this.background[1].color.a >= 1.0) { this.background[1].color.a = 1f; } this.staff[0].color.a -= 0.02f; if ((double)this.staff[0].color.a <= 0.0) { this.staff[0].color.a = 0.0f; } this.staff[1].color.a += 0.01f; if ((double)this.staff[1].color.a >= 1.0) { this.staff[1].color.a = 1f; } } else if (this.time > 3080 && this.time <= 3490) { this.background[0].position.X += 0.1f; this.background[1].position = this.background[0].position; this.staff[1].color.a -= 0.02f; if ((double)this.staff[1].color.a <= 0.0) { this.staff[1].color.a = 0.0f; } this.staff[2].color.a += 0.01f; if ((double)this.staff[2].color.a >= 1.0) { this.staff[2].color.a = 1f; } } else if (this.time > 3490 && this.time <= 3900) { this.background[0].position.X += 0.1f; this.background[1].position = this.background[0].position; this.background[2].position = this.background[0].position; this.background[2].scale = this.background[0].scale; this.background[2].color.a += 0.005f; if ((double)this.background[2].color.a >= 1.0) { this.background[2].color.a = 1f; } this.staff[2].color.a -= 0.02f; if ((double)this.staff[2].color.a <= 0.0) { this.staff[2].color.a = 0.0f; } this.staff[3].color.a += 0.01f; if ((double)this.staff[3].color.a >= 1.0) { this.staff[3].color.a = 1f; } } else if (this.time > 3900 && this.time <= 4310) { this.background[0].position.X += 0.1f; this.background[2].position = this.background[0].position; this.staff[3].color.a -= 0.02f; if ((double)this.staff[3].color.a <= 0.0) { this.staff[3].color.a = 0.0f; } this.staff[4].color.a += 0.01f; if ((double)this.staff[4].color.a >= 1.0) { this.staff[4].color.a = 1f; } } else if (this.time > 4310 && this.time <= 4750) { this.background[0].position.X += 0.1f; this.background[2].position = this.background[0].position; this.background[3].position = this.background[0].position; this.background[3].scale = this.background[0].scale; this.background[3].color.a += 0.005f; if ((double)this.background[3].color.a >= 1.0) { this.background[3].color.a = 1f; } this.staff[4].color.a -= 0.02f; if ((double)this.staff[4].color.a <= 0.0) { this.staff[4].color.a = 0.0f; } this.staff[5].color.a += 0.01f; if ((double)this.staff[5].color.a >= 1.0) { this.staff[5].color.a = 1f; } } else if (this.time > 4750 && this.time <= 4800) { this.staff[5].color.a -= 0.05f; if ((double)this.staff[5].color.a <= 0.0) { this.staff[5].color.a = 0.0f; } for (int index = 0; index < 4; ++index) { this.background[index].color.a -= 0.02f; } this.black.position.X += (float)((-200.0 - (double)this.black.position.X) / 15.0); } else if (this.time > 4800 && this.time <= 5220) { this.background2[0].color.a += 0.02f; if ((double)this.background2[0].color.a >= 1.0) { this.background2[0].color.a = 1f; } this.background2[0].position.X += 0.1f; this.background2[0].position.Y = 230f; this.background2[0].scale = new Vector2(0.8f, 0.8f); this.staff2[0].color.a += 0.01f; if ((double)this.staff2[0].color.a >= 1.0) { this.staff2[0].color.a = 1f; } } else if (this.time > 5220 && this.time <= 5640) { this.background2[0].position.X += 0.1f; this.staff2[0].color.a -= 0.02f; if ((double)this.staff2[0].color.a <= 0.0) { this.staff2[0].color.a = 0.0f; } this.staff2[1].color.a += 0.01f; if ((double)this.staff2[1].color.a >= 1.0) { this.staff2[1].color.a = 1f; } } else if (this.time > 5640 && this.time <= 6060) { this.background2[0].position.X += 0.1f; this.staff2[1].color.a -= 0.02f; if ((double)this.staff2[1].color.a <= 0.0) { this.staff2[1].color.a = 0.0f; } this.staff2[2].color.a += 0.01f; if ((double)this.staff2[2].color.a >= 1.0) { this.staff2[2].color.a = 1f; } } else if (this.time > 6060 && this.time <= 6480) { this.background2[0].position.X += 0.1f; this.staff2[2].color.a -= 0.02f; if ((double)this.staff2[2].color.a <= 0.0) { this.staff2[2].color.a = 0.0f; } this.staff2[3].color.a += 0.01f; if ((double)this.staff2[3].color.a >= 1.0) { this.staff2[3].color.a = 1f; } } if (this.time > 6450 && this.time <= 6500) { this.whitecolor2 += 0.02f; } else if (this.time == 6501) { for (int index = 0; index < 4; ++index) { this.textcolor[index] = 0.0f; } this.background2[0].color.a = 0.0f; this.staff2[3].color.a = 0.0f; this.black.color.a = 0.0f; this.whitecolor2 = 0.0f; this.background2[1].scale = new Vector2(1.3f, 1.3f); } else if (this.time > 6500 && this.time <= 6520) { this.background2[1].scale += new Vector2((float)((0.699999988079071 - (double)this.background2[1].scale.X) / 15.0), (float)((0.699999988079071 - (double)this.background2[1].scale.Y) / 15.0)); this.background2[1].color.a += 0.05f; } else if (this.time > 6520 && this.time <= 6920) { this.background2[1].scale -= new Vector2(0.0006f, 0.0006f); if (this.time > 6720) { this.thanks.color.a += 0.05f; if ((double)this.thanks.color.a >= 1.0) { this.thanks.color.a = 1f; } } } else if (this.time > 6920 && this.time <= 6970) { this.background2[1].scale -= new Vector2(0.0006f, 0.0006f); this.whitecolor -= 0.05f; if ((double)this.whitecolor <= 0.0) { this.whitecolor = 0.0f; } this.background2[1].color.a -= 0.05f; if ((double)this.background2[1].color.a <= 0.0) { this.background2[1].color.a = 0.0f; } this.thanks.color.a -= 0.1f; if ((double)this.thanks.color.a <= 0.0) { this.thanks.color.a = 0.0f; } this.next.color.a += 0.02f; } else if (this.time >= 7120 && this.time <= 7140) { this.next.color.a -= 0.05f; } else if (this.time == 7141 && this.edtype != 4) { if (this.edtype == 1) { ++this.record.Playdata.players[(int)(Main.Character - 1)].cleartime; PracticeData data = this.LoadPracticeData(); data.clear[(int)(Main.Character - 1)] = true; this.SavePracticeData(data); Program.game.achivmanager.Check(AchievementType.Normal, 3, new Hashtable() { [(object)"practice"] = (object)data }); Program.game.achivmanager.Check(AchievementType.Normal, 4, new Hashtable() { [(object)"playdata"] = (object)this.record.Playdata }); Program.game.achivmanager.Check(AchievementType.Normal, 5, new Hashtable() { [(object)"practice"] = (object)data }); } } else if (this.time > 7141 && this.edtype != 4 && !this.record.Ok) { this.record.Update(); if (this.record.Ok) { this.SavePlayData(this.record.Playdata); } } else if (this.time > 7141 && this.edtype != 4 && !this.replay.Ok) { this.replay.Update(); } else if (this.time > 7141) { BGM.Disposes(); Program.game.StopSound("Result bank"); Main.stage = "ENTRANCE"; this.Finished = true; } if (this.edtype == 4 && (Main.keyboardstat.IsKeyDown(Keys.Escape) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Special, Main.prepadstat) || PadState.IsKeyPressed(JOYKEYS.Pause, Main.prepadstat))) { BGM.Disposes(); Program.game.StopSound("Result bank"); Main.stage = "ENTRANCE"; this.Finished = true; } if (this.praticle1 != null) { this.praticle1.Update(); } } else { this.ContinueUpdate(); } ++this.time; }
public ED(bool continued, int edtype, GraphicsDevice g, RecordSave record, ReplaySave replay) { this.ifcontinued = continued; this.edtype = edtype; this.record = record; this.replay = replay; this.gd = g; GC.Collect(); BGM.Disposes(); PracticeData practiceData = this.LoadPracticeData(); if (edtype == 1) { for (int index = 0; index < 4; ++index) { if (practiceData.clear[index]) { this.ifsaw = true; break; } } } Program.game.achivmanager.Check(AchievementType.Normal, 2, new Hashtable() { [(object)"ok"] = (object)(!this.ifcontinued & edtype == 1) }); Program.game.achivmanager.Check(AchievementType.Challenge, 9, new Hashtable() { [(object)"level"] = (object)Main.Level }); if (edtype == 1 && !this.ifsaw || edtype == 4) { if (!this.ifcontinued || edtype == 4) { this.praticle = Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\List\\praticle.xna", 0)); this.praticle1 = new SimplePraticleActor(new Vector2(470f, 0.0f), new Vector2(400f, 100f), 10, 3); this.praticle1.SetTexture(this.praticle, new Rectangle(155, 6, 32, 22), new Vector2(16f, 11f), true); this.praticle1.SetPraticle(new Vector2(1f, 1f), new Vector2(-0.7f, 0.8f), 0.0f, Vector2.Zero, 0.0f, new Vector2(0.0f, 360f)); this.praticle1.SetPraticleEvent(new PraticleUpdate(this.Praticle1Update)); this.text = Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\31.xna", 0)); this.textcolor = new float[4]; this.white = Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\32.xna", 0)); this.background = new Sprite[4]; for (int index = 0; index < 4; ++index) { Texture2D t = Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\" + (1 + index).ToString() + ".xna", 0)); this.background[index] = new Sprite(t); this.background[index].origin = new Vector2((float)(t.Width / 2), (float)(t.Height / 2)); this.background[index].position = new Vector2(320f, 240f); this.background[index].scale = new Vector2(2f, 2f); } Texture2D t1 = Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Pattern\\logo.xna", 0)); this.logo = new Sprite(t1); this.logo.origin = new Vector2((float)(t1.Width / 2), (float)(t1.Height / 2)); this.logo.position = new Vector2(320f, 240f); this.logo.scale = new Vector2(1.2f, 1.2f); this.end = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\33.xna", 0))); this.black = new Sprite(this.white); this.black.position = new Vector2(640f, 0.0f); this.black.color.r = this.black.color.g = this.black.color.b = 0.0f; this.staff = new Sprite[6]; for (int index = 0; index < 6; ++index) { this.staff[index] = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\" + (34 + index).ToString() + ".xna", 0))); } this.background2 = new Sprite[2]; for (int index = 0; index < 2; ++index) { Texture2D t2 = Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\" + (40 + index).ToString() + ".xna", 0)); this.background2[index] = new Sprite(t2); this.background2[index].origin = new Vector2((float)(t2.Width / 2), (float)(t2.Height / 2)); this.background2[index].position = new Vector2(320f, 240f); this.background2[index].scale = new Vector2(1f, 1f); } this.staff2 = new Sprite[4]; for (int index = 0; index < 4; ++index) { this.staff2[index] = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\" + (42 + index).ToString() + ".xna", 0))); } this.white2 = Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\32.xna", 0)); this.thanks = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\46.xna", 0))); this.next = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\47.xna", 0))); } else { Program.game.PlaySound("Result bank"); this.dialogbg = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\53.xna", 0))); this.dialog = new Sprite[4]; for (int index = 0; index < 4; ++index) { this.dialog[index] = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\" + (48 + index).ToString() + ".xna", 0))); this.dialog[index].position.Y = 30f; } this.tip = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\52.xna", 0))); } } else if (!this.ifcontinued) { this.time = 7141; Program.game.PlaySound("Result bank"); } else { Program.game.PlaySound("Result bank"); this.dialogbg = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\53.xna", 0))); this.dialog = new Sprite[4]; for (int index = 0; index < 4; ++index) { this.dialog[index] = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\" + (48 + index).ToString() + ".xna", 0))); this.dialog[index].position.Y = 30f; } this.tip = new Sprite(Texture2D.FromFile(g, Cry.Decry("Content\\Graphics\\Black\\52.xna", 0))); } }
public CSManager(Texture2D barrages_t, Texture2D mist_t, Texture2D dis_t) { this.csc = new List <CrazyStorm>(); this.esc = new List <CrazyStorm>(); this.barrages = barrages_t; this.mist = mist_t; this.dis = dis_t; this.bgset = new List <BarrageType>(); this.conditions = new Hashtable(); this.results = new Hashtable(); this.type = new Hashtable(); this.conditions2 = new Hashtable(); this.results2 = new Hashtable(); this.results3 = new Hashtable(); this.cconditions = new Hashtable(); this.cresults = new Hashtable(); this.lconditions = new Hashtable(); this.lresults = new Hashtable(); this.lresults2 = new Hashtable(); this.type.Add((object)"正比", (object)0); this.type.Add((object)"固定", (object)1); this.type.Add((object)"正弦", (object)2); this.conditions.Add((object)"", (object)0); this.conditions.Add((object)"当前帧", (object)0); this.conditions.Add((object)"X坐标", (object)1); this.conditions.Add((object)"Y坐标", (object)2); this.conditions.Add((object)"半径", (object)3); this.conditions.Add((object)"半径方向", (object)4); this.conditions.Add((object)"条数", (object)5); this.conditions.Add((object)"周期", (object)6); this.conditions.Add((object)"角度", (object)7); this.conditions.Add((object)"范围", (object)8); this.conditions.Add((object)"宽比", (object)9); this.conditions.Add((object)"高比", (object)10); this.conditions.Add((object)"不透明度", (object)11); this.conditions.Add((object)"朝向", (object)12); this.results.Add((object)"X坐标", (object)0); this.results.Add((object)"Y坐标", (object)1); this.results.Add((object)"半径", (object)2); this.results.Add((object)"半径方向", (object)3); this.results.Add((object)"条数", (object)4); this.results.Add((object)"周期", (object)5); this.results.Add((object)"角度", (object)6); this.results.Add((object)"范围", (object)7); this.results.Add((object)"速度", (object)8); this.results.Add((object)"速度方向", (object)9); this.results.Add((object)"加速度", (object)10); this.results.Add((object)"加速度方向", (object)11); this.results.Add((object)"生命", (object)12); this.results.Add((object)"类型", (object)13); this.results.Add((object)"宽比", (object)14); this.results.Add((object)"高比", (object)15); this.results.Add((object)"R", (object)16); this.results.Add((object)"G", (object)17); this.results.Add((object)"B", (object)18); this.results.Add((object)"不透明度", (object)19); this.results.Add((object)"朝向", (object)20); this.results.Add((object)"子弹速度", (object)21); this.results.Add((object)"子弹速度方向", (object)22); this.results.Add((object)"子弹加速度", (object)23); this.results.Add((object)"子弹加速度方向", (object)24); this.results.Add((object)"横比", (object)25); this.results.Add((object)"纵比", (object)26); this.results.Add((object)"雾化效果", (object)27); this.results.Add((object)"消除效果", (object)28); this.results.Add((object)"高光效果", (object)29); this.results.Add((object)"拖影效果", (object)30); this.results.Add((object)"出屏即消", (object)31); this.results.Add((object)"无敌状态", (object)32); this.conditions2.Add((object)"", (object)0); this.conditions2.Add((object)"当前帧", (object)0); this.conditions2.Add((object)"X坐标", (object)1); this.conditions2.Add((object)"Y坐标", (object)2); this.results2.Add((object)"生命", (object)0); this.results2.Add((object)"类型", (object)1); this.results2.Add((object)"宽比", (object)2); this.results2.Add((object)"高比", (object)3); this.results2.Add((object)"R", (object)4); this.results2.Add((object)"G", (object)5); this.results2.Add((object)"B", (object)6); this.results2.Add((object)"不透明度", (object)7); this.results2.Add((object)"朝向", (object)8); this.results2.Add((object)"子弹速度", (object)9); this.results2.Add((object)"子弹速度方向", (object)10); this.results2.Add((object)"子弹加速度", (object)11); this.results2.Add((object)"子弹加速度方向", (object)12); this.results2.Add((object)"横比", (object)13); this.results2.Add((object)"纵比", (object)14); this.results2.Add((object)"雾化效果", (object)15); this.results2.Add((object)"消除效果", (object)16); this.results2.Add((object)"高光效果", (object)17); this.results2.Add((object)"拖影效果", (object)18); this.results2.Add((object)"出屏即消", (object)19); this.results2.Add((object)"无敌状态", (object)20); this.results3.Add((object)"速度", (object)0); this.results3.Add((object)"速度方向", (object)1); this.results3.Add((object)"加速度", (object)2); this.results3.Add((object)"加速度方向", (object)3); this.cconditions.Add((object)"", (object)0); this.cconditions.Add((object)"当前帧", (object)0); this.cconditions.Add((object)"X坐标", (object)1); this.cconditions.Add((object)"Y坐标", (object)2); this.cconditions.Add((object)"半宽", (object)3); this.cconditions.Add((object)"半高", (object)4); this.cresults.Add((object)"半宽", (object)0); this.cresults.Add((object)"半高", (object)1); this.cresults.Add((object)"启用圆形", (object)2); this.cresults.Add((object)"速度", (object)3); this.cresults.Add((object)"速度方向", (object)4); this.cresults.Add((object)"加速度", (object)5); this.cresults.Add((object)"加速度方向", (object)6); this.cresults.Add((object)"类型", (object)7); this.cresults.Add((object)"ID", (object)8); this.cresults.Add((object)"X坐标", (object)9); this.cresults.Add((object)"Y坐标", (object)10); this.lconditions.Add((object)"", (object)0); this.lconditions.Add((object)"当前帧", (object)0); this.lconditions.Add((object)"半径", (object)1); this.lconditions.Add((object)"半径方向", (object)2); this.lconditions.Add((object)"条数", (object)3); this.lconditions.Add((object)"周期", (object)4); this.lconditions.Add((object)"角度", (object)5); this.lconditions.Add((object)"范围", (object)6); this.lconditions.Add((object)"宽比", (object)7); this.lconditions.Add((object)"长度", (object)8); this.lconditions.Add((object)"不透明度", (object)9); this.lresults.Add((object)"半径", (object)0); this.lresults.Add((object)"半径方向", (object)1); this.lresults.Add((object)"条数", (object)2); this.lresults.Add((object)"周期", (object)3); this.lresults.Add((object)"角度", (object)4); this.lresults.Add((object)"范围", (object)5); this.lresults.Add((object)"速度", (object)6); this.lresults.Add((object)"速度方向", (object)7); this.lresults.Add((object)"加速度", (object)8); this.lresults.Add((object)"加速度方向", (object)9); this.lresults.Add((object)"生命", (object)10); this.lresults.Add((object)"类型", (object)11); this.lresults.Add((object)"宽比", (object)12); this.lresults.Add((object)"长度", (object)13); this.lresults.Add((object)"不透明度", (object)14); this.lresults.Add((object)"子弹速度", (object)15); this.lresults.Add((object)"子弹速度方向", (object)16); this.lresults.Add((object)"子弹加速度", (object)17); this.lresults.Add((object)"子弹加速度方向", (object)18); this.lresults.Add((object)"横比", (object)19); this.lresults.Add((object)"纵比", (object)20); this.lresults.Add((object)"高光效果", (object)21); this.lresults.Add((object)"出屏即消", (object)22); this.lresults.Add((object)"无敌状态", (object)23); this.lresults2.Add((object)"生命", (object)0); this.lresults2.Add((object)"类型", (object)1); this.lresults2.Add((object)"宽比", (object)2); this.lresults2.Add((object)"长度", (object)3); this.lresults2.Add((object)"不透明度", (object)4); this.lresults2.Add((object)"子弹速度", (object)5); this.lresults2.Add((object)"子弹速度方向", (object)6); this.lresults2.Add((object)"子弹加速度", (object)7); this.lresults2.Add((object)"子弹加速度方向", (object)8); this.lresults2.Add((object)"横比", (object)9); this.lresults2.Add((object)"纵比", (object)10); this.lresults2.Add((object)"高光效果", (object)11); this.lresults2.Add((object)"出屏即消", (object)12); this.lresults2.Add((object)"无敌状态", (object)13); StreamReader streamReader = new StreamReader(Cry.Decry("Content/Data/3.xna", 2)); for (int index = 0; index < 228; ++index) { string str = streamReader.ReadLine(); BarrageType barrageType = new BarrageType(); barrageType.rect = new Rectangle(int.Parse(str.Split('_')[1]), int.Parse(str.Split('_')[2]), int.Parse(str.Split('_')[3]), int.Parse(str.Split('_')[4])); barrageType.origin = new Vector2((float)int.Parse(str.Split('_')[5]), (float)int.Parse(str.Split('_')[6])); barrageType.origin0 = new Vector2((float)int.Parse(str.Split('_')[5]), (float)int.Parse(str.Split('_')[6])); barrageType.pdr0 = (float)int.Parse(str.Split('_')[7]); if (str.Split('_')[8] != "") { barrageType.color = int.Parse(str.Split('_')[8]); } else { barrageType.color = -1; } this.bgset.Add(barrageType); } streamReader.Close(); }
protected override void Initialize() { try { Main.fpstimer = new System.Threading.Timer(new TimerCallback(this.FpsRecord), (object)null, 0, 1000); if (!File.Exists("Content/Music/00.xna")) { StreamWriter streamWriter = new StreamWriter("Content/Music/00.xna", false); streamWriter.WriteLine("Fantasy Danmaku Festival"); streamWriter.WriteLine("0"); streamWriter.Close(); Cry.Encry("Content/Music/00.xna", 2); } if (!File.Exists("Content/Data/4.xna")) { PlayData playData = new PlayData(); FileStream fileStream = new FileStream("Content/Data/4.xna", FileMode.Create); new BinaryFormatter().Serialize((Stream)fileStream, (object)playData); fileStream.Close(); Cry.Encry("Content/Data/4.xna", 2); } if (!File.Exists("Content/Data/5.xna")) { PracticeData practiceData = new PracticeData(); FileStream fileStream = new FileStream("Content/Data/5.xna", FileMode.Create); new BinaryFormatter().Serialize((Stream)fileStream, (object)practiceData); fileStream.Close(); Cry.Encry("Content/Data/5.xna", 2); } if (!File.Exists("Content/Data/8.xna")) { SpecialData specialData = new SpecialData(); FileStream fileStream = new FileStream("Content/Data/8.xna", FileMode.Create); new BinaryFormatter().Serialize((Stream)fileStream, (object)specialData); fileStream.Close(); Cry.Encry("Content/Data/8.xna", 2); } if (!File.Exists("Content/Music/10.xna")) { new StreamWriter("Content/Data/10.xna", false).Close(); Cry.Encry("Content/Data/10.xna", 2); } Main.rand = new Random(); Main.font = new SpriteFontX(new Font("宋体", 12f, FontStyle.Regular, GraphicsUnit.Pixel), (IGraphicsDeviceService)this.graphics, TextRenderingHint.ClearTypeGridFit); Main.dfont = new SpriteFontX(new Font("微软雅黑", 16f, FontStyle.Bold, GraphicsUnit.Pixel), (IGraphicsDeviceService)this.graphics, TextRenderingHint.AntiAlias); Main.scfont = new SpriteFontX(new Font("宋体", 16f, FontStyle.Bold, GraphicsUnit.Pixel), (IGraphicsDeviceService)this.graphics, TextRenderingHint.AntiAlias); Main.scdfont = new SpriteFontX(new Font("宋体", 10f, FontStyle.Bold, GraphicsUnit.Pixel), (IGraphicsDeviceService)this.graphics, TextRenderingHint.SingleBitPerPixelGridFit); PadState.InitPad(Main.ini); Main.WindowSizeType = int.Parse(Main.ini.ReadValue("Graphics", "WindowSize")); Main.Fullorwindow = int.Parse(Main.ini.ReadValue("Mode", "Full/Window")); Main.BackGround = int.Parse(Main.ini.ReadValue("Graphics", "BackGround")) == 1; Main.VSync = int.Parse(Main.ini.ReadValue("Graphics", "VSync")) == 1; this.graphics.SynchronizeWithVerticalRetrace = Main.VSync; this.IsFixedTimeStep = false; Main.ResizeWindow(this, Main.WindowSizeType); if (Main.Fullorwindow == 1) { this.graphics.ToggleFullScreen(); } Sound.Init(); Music.Init(); Main.stage = "ENTRANCE"; base.Initialize(); } catch (Exception ex) { StreamWriter streamWriter = new StreamWriter("Error.txt"); DateTime now = DateTime.Now; streamWriter.Write("[" + now.Hour.ToString("00") + ":" + now.Minute.ToString("00") + ":" + now.Second.ToString("00") + "]\n" + ex.ToString()); streamWriter.Close(); Main.Message(ex.ToString()); } }