Beispiel #1
0
        public unsafe void Update()
        {
            if (this.time < 22)
            {
                this.blackalpha += 0.03f;
                if ((double)this.blackalpha >= 0.600000023841858)
                {
                    this.blackalpha = 0.6f;
                }
            }
            else if (this.time >= 22 && this.time < 32)
            {
                this.worda += 0.1f;
                if ((double)this.worda >= 1.0)
                {
                    this.worda = 1f;
                }
            }
            if (!this.fadeout && !this.step && this.time >= 32)
            {
                if (((!this.fadeout ? 1 : 0) & (Main.keyboardstat.IsKeyDown(Keys.Left) & Main.keyboardstat != Main.prekeyboard ? 1 : (PadState.IsKeyPressed(JOYKEYS.Left, Main.prepadstat) ? 1 : 0))) != 0)
                {
                    Program.game.entrance.PlaySound("select");
                    --this.page;
                    if (this.page < 0)
                    {
                        this.page = 2;
                    }
                }
                else if (((!this.fadeout ? 1 : 0) & (Main.keyboardstat.IsKeyDown(Keys.Right) & Main.keyboardstat != Main.prekeyboard ? 1 : (PadState.IsKeyPressed(JOYKEYS.Right, Main.prepadstat) ? 1 : 0))) != 0)
                {
                    Program.game.entrance.PlaySound("select");
                    ++this.page;
                    if (this.page > 2)
                    {
                        this.page = 0;
                    }
                }
                else if (((!this.fadeout ? 1 : 0) & (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard ? 1 : (PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat) ? 1 : 0))) != 0)
                {
                    Program.game.entrance.PlaySound("select");
                    --this.selection;
                    if (this.selection < 0)
                    {
                        this.selection = 14;
                    }
                }
                else if (((!this.fadeout ? 1 : 0) & (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard ? 1 : (PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat) ? 1 : 0))) != 0)
                {
                    Program.game.entrance.PlaySound("select");
                    ++this.selection;
                    if (this.selection > 14)
                    {
                        this.selection = 0;
                    }
                }
                else if (Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat))
                {
                    if (this.rpys[this.page * 15 + this.selection] != null)
                    {
                        Program.game.entrance.PlaySound("ok");
                        this.step        = true;
                        this.time2       = 0;
                        this.black2pos.X = 245f;
                        this.vselection  = 0;
                    }
                }
                else if (Main.keyboardstat.IsKeyDown(Keys.X) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Escape) & Main.keyboardstat != Main.prekeyboard || (PadState.IsKeyPressed(JOYKEYS.Special, Main.prepadstat) || PadState.IsKeyPressed(JOYKEYS.Pause, Main.prepadstat)))
                {
                    Program.game.entrance.PlaySound("cancel");
                    this.fadeout = true;
                }
            }
            if (this.step)
            {
                if (this.time2 <= 20)
                {
                    if (this.time2 == 0)
                    {
                        int num = 0;
                        this.stage      = new List <int>();
                        this.stagescore = new List <long>();
                        for (int index = 0; index < 7; ++index)
                        {
                            this.stagescore.Add(0L);
                        }
                        foreach (ScoreRecord score in this.rms[this.page * 15 + this.selection].scores)
                        {
                            if ((int)score.stage != (int)(byte)num)
                            {
                                this.stage.Add((int)score.stage);
                                num = (int)score.stage;
                            }
                        }
                        Main.ReplayFirstStage = this.stage[0];
                        foreach (ScoreRecord score in this.rms[this.page * 15 + this.selection].scores)
                        {
                            if (score.type == (byte)10)
                            {
                                this.stagescore[(int)score.stage - 1] = score.score;
                            }
                        }
                        this.selection2 = this.stage[this.vselection];
                    }
                    this.black2pos.X += (float)((195.0 - (double)this.black2pos.X) / 10.0);
                    this.black2alpha += 0.035f;
                    if ((double)this.black2alpha >= 0.699999988079071)
                    {
                        this.black2alpha = 0.7f;
                    }
                    this.word2a += 0.05f;
                }
                else if (!this.ok)
                {
                    if (Main.keyboardstat.IsKeyDown(Keys.X) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Escape) & Main.keyboardstat != Main.prekeyboard || (PadState.IsKeyPressed(JOYKEYS.Special, Main.prepadstat) || PadState.IsKeyPressed(JOYKEYS.Pause, Main.prepadstat)))
                    {
                        this.time2 = 0;
                        this.stage = (List <int>)null;
                        this.step  = false;
                        fixed(float *v = &this.black2alpha)
                        {
                            ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR);
                        }

                        fixed(float *v = &this.word2a)
                        {
                            ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR);
                        }

                        Program.game.entrance.PlaySound("cancel");
                    }
                    if (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat))
                    {
                        --this.vselection;
                        if (this.vselection < 0)
                        {
                            this.vselection = this.stage.Count - 1;
                        }
                        this.selection2 = this.stage[this.vselection];
                        Program.game.entrance.PlaySound("select");
                    }
                    if (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat))
                    {
                        ++this.vselection;
                        if (this.vselection >= this.stage.Count)
                        {
                            this.vselection = 0;
                        }
                        this.selection2 = this.stage[this.vselection];
                        Program.game.entrance.PlaySound("select");
                    }
                    if (Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat))
                    {
                        Program.game.entrance.PlaySound("ok");
                        this.ok = true;
                        if (this.rpys[this.page * 15 + this.selection].Level == (byte)5)
                        {
                            this.spellcard   = true;
                            Main.Mode        = Modes.SINGLE;
                            Main.SpecialMode = Modes.SPELLCARD;
                            this.bossstage   = (int)this.rpys[this.page * 15 + this.selection].Mode;
                            this.barrageid   = (int)this.rpys[this.page * 15 + this.selection].SpecialMode;
                        }
                        else
                        {
                            Main.Mode        = (Modes)this.rpys[this.page * 15 + this.selection].Mode;
                            Main.SpecialMode = (Modes)this.rpys[this.page * 15 + this.selection].SpecialMode;
                            Main.Level       = (Difficulty)((int)this.rpys[this.page * 15 + this.selection].Level + 1);
                        }
                        Main.Character = (Cname)((int)this.rpys[this.page * 15 + this.selection].Chara + 1);
                        Main.SetReplay(this.rms[this.page * 15 + this.selection]);
                        Main.gameseed = this.seeds[this.page * 15 + this.selection];
                        fixed(float *v = &this.blackalpha)
                        {
                            ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR);
                        }

                        fixed(float *v = &this.worda)
                        {
                            ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR);
                        }

                        fixed(float *v = &this.black2alpha)
                        {
                            ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR);
                        }

                        fixed(float *v = &this.word2a)
                        {
                            ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR);
                        }
                    }
                }
                ++this.time2;
            }
            if (this.fadeout)
            {
                this.blackalpha -= 0.03f;
                if ((double)this.blackalpha <= 0.0)
                {
                    this.blackalpha = 0.0f;
                }
                this.worda -= 0.1f;
                if ((double)this.worda <= 0.0)
                {
                    this.worda = 0.0f;
                }
            }
            ++this.time;
        }
Beispiel #2
0
        public unsafe void Update()
        {
            if (time >= 0 && time <= 22)
            {
                displaybox.position.X = ((displaybox.position.X * 9.0f + 88.0f) / 10.0f);
                displaybox.color.a   += 0.05f;
                if (displaybox.color.a >= 1.0)
                {
                    displaybox.color.a = 1f;
                }
                level[selection - 1].color.a += 0.05f;
                if (level[selection - 1].color.a >= 1.0)
                {
                    level[selection - 1].color.a = 1f;
                }
                for (int index = 0; index < 5; ++index)
                {
                    if (time == 1)
                    {
                        fixed(float *v = &level[index].position.X)
                        {
                            ValueEvent valueEvent = new ValueEvent(v, (80 - (selection - 1 - index) * 100), 10, ChangeType.NONLINEAR);
                        }
                    }
                    if (index != selection - 1)
                    {
                        level[index].color.a -= 0.05f;
                        if (level[index].color.a <= 0.0)
                        {
                            level[index].color.a = 0.0f;
                        }
                    }
                }
                if (time == 1)
                {
                    fixed(float *v = &crapwise.color.a)
                    {
                        ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.NONLINEAR);
                    }
                }
                if (time == 11)
                {
                    crapwisexy[0] = new Vector2(366f, 242f);
                    crapwisexy[1] = new Vector2(52f, 242f);
                    fixed(float *v = &crapwise.color.a)
                    {
                        ValueEvent valueEvent = new ValueEvent(v, 1f, 10, ChangeType.NONLINEAR);
                    }
                }
                if (!steps)
                {
                    for (int index = 0; index < 4; ++index)
                    {
                        character[index].color.a -= 0.05f;
                        if (character[index].color.a <= 0.0)
                        {
                            character[index].color.a = 0.0f;
                        }
                    }
                }
            }
            if (!fadeout & !steps)
            {
                if (((!fadeout ? 1 : 0) & (Main.keyboardstat.IsKeyDown(Keys.Left) & Main.keyboardstat != Main.prekeyboard ? 1 : (PadState.IsKeyPressed(JOYKEYS.Left, Main.prepadstat) ? 1 : 0))) != 0)
                {
                    Program.game.entrance.PlaySound("select");
                    --selection;
                    if (selection == 0)
                    {
                        selection = 4;
                    }
                    for (int index = 0; index < 5; ++index)
                    {
                        fixed(float *v = &level[index].position.X)
                        {
                            ValueEvent valueEvent = new ValueEvent(v, (80 - (selection - 1 - index) * 100), 10, ChangeType.NONLINEAR);
                        }
                    }
                    time = 0;
                }
                else if (((!fadeout ? 1 : 0) & (Main.keyboardstat.IsKeyDown(Keys.Right) & Main.keyboardstat != Main.prekeyboard ? 1 : (PadState.IsKeyPressed(JOYKEYS.Right, Main.prepadstat) ? 1 : 0))) != 0)
                {
                    Program.game.entrance.PlaySound("select");
                    ++selection;
                    if (selection == 5)
                    {
                        selection = 1;
                    }
                    for (int index = 0; index < 5; ++index)
                    {
                        if (index != selection - 1)
                        {
                            level[index].color.a -= 0.05f;
                            if (level[index].color.a <= 0.0)
                            {
                                level[selection - 1].color.a = 0.0f;
                            }
                        }
                    }
                    for (int index = 0; index < 5; ++index)
                    {
                        fixed(float *v = &level[index].position.X)
                        {
                            ValueEvent valueEvent = new ValueEvent(v, (80 - (selection - 1 - index) * 100), 10, ChangeType.NONLINEAR);
                        }
                    }
                    time = 0;
                }
                if (time >= 22)
                {
                    if (Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat))
                    {
                        Program.game.entrance.PlaySound("ok");
                        // Main.Level=(Difficulty)selection;
                        Main.Level = Difficulty.LUNATIC;
                        time2      = 0;
                        steps      = true;
                    }
                    else if (Main.keyboardstat.IsKeyDown(Keys.X) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Escape) & Main.keyboardstat != Main.prekeyboard || (PadState.IsKeyPressed(JOYKEYS.Special, Main.prepadstat) || PadState.IsKeyPressed(JOYKEYS.Pause, Main.prepadstat)))
                    {
                        for (int index = 0; index < 5; ++index)
                        {
                            fixed(float *v = &level[index].position.X)
                            {
                                ValueEvent valueEvent = new ValueEvent(v, (30 - (selection - 1 - index) * 100), 10, ChangeType.NONLINEAR);
                            }
                        }
                        Program.game.entrance.PlaySound("cancel");
                        fadeout = true;
                    }
                }
            }
            if (!steps)
            {
                if (time <= 72)
                {
                    displaybox.color.a -= 0.01f;
                    if (displaybox.color.a <= 0.0)
                    {
                        displaybox.color.a = 0.0f;
                    }
                }
                if (time >= 72 & time <= 122)
                {
                    displaybox.color.a += 0.01f;
                    if (displaybox.color.a >= 1.0)
                    {
                        displaybox.color.a = 1f;
                    }
                }
                if (time >= 122)
                {
                    time = 42;
                }
            }
            else
            {
                if (time2 > 0 & time2 <= 22)
                {
                    displaybox.position.X = ((displaybox.position.X * 4.0f + 88.0f - 50.0f) / 5.0f);
                    displaybox.color.a   -= 0.05f;
                    if (displaybox.color.a <= 0.0)
                    {
                        displaybox.color.a = 0.0f;
                    }
                    level[selection - 1].color.a -= 0.05f;
                    if (level[selection - 1].color.a <= 0.0)
                    {
                        level[selection - 1].color.a = 0.0f;
                    }
                    for (int index = 0; index < 5; ++index)
                    {
                        if (time2 == 1)
                        {
                            fixed(float *v = &level[index].position.X)
                            {
                                ValueEvent valueEvent = new ValueEvent(v, (30 - (selection - 1 - index) * 100), 10, ChangeType.NONLINEAR);
                            }
                        }
                    }
                    if (time2 == 1)
                    {
                        fixed(float *v = &crapwise.color.a)
                        {
                            ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.NONLINEAR);
                        }

                        fixed(float *v = &cinfo.color.a)
                        {
                            ValueEvent valueEvent = new ValueEvent(v, 1f, 10, ChangeType.NONLINEAR);
                        }

                        fixed(float *v = &cinfo.position.X)
                        {
                            ValueEvent valueEvent = new ValueEvent(v, 20f, 10, ChangeType.NONLINEAR);
                        }
                    }
                    if (time2 == 11)
                    {
                        crapwisexy[0] = new Vector2(600f, 242f);
                        crapwisexy[1] = new Vector2(22f, 242f);
                        fixed(float *v = &crapwise.color.a)
                        {
                            ValueEvent valueEvent = new ValueEvent(v, 1f, 10, ChangeType.NONLINEAR);
                        }
                    }
                }
                if (time2 >= 23)
                {
                    time2 = 23;
                }
                if (time2 >= 0 && !ok)
                {
                    for (int index = 0; index < 4; ++index)
                    {
                        if (time2 == 0)
                        {
                            character[index].position.X = 200f;
                        }
                        if (index == selection2 - 1)
                        {
                            character[index].color.a += 0.05f;
                            if (character[index].color.a >= 1.0)
                            {
                                character[index].color.a = 1f;
                            }
                            character[index].position.X += ((0.0f - character[index].position.X) / 10.0f);
                        }
                        else
                        {
                            character[index].color.a -= 0.05f;
                            if (character[index].color.a <= 0.0)
                            {
                                character[index].color.a = 0.0f;
                            }
                            character[index].position.X += ((200.0f - character[index].position.X) / 10.0f);
                        }
                    }
                }
                if (time2 >= 22 && !steps2)
                {
                    if (((!fadeout ? 1 : 0) & (Main.keyboardstat.IsKeyDown(Keys.Left) & Main.keyboardstat != Main.prekeyboard ? 1 : (PadState.IsKeyPressed(JOYKEYS.Left, Main.prepadstat) ? 1 : 0))) != 0)
                    {
                        Program.game.entrance.PlaySound("select");
                        --selection2;
                        if (selection2 == 0)
                        {
                            selection2 = 4;
                        }
                    }
                    else if (((!fadeout ? 1 : 0) & (Main.keyboardstat.IsKeyDown(Keys.Right) & Main.keyboardstat != Main.prekeyboard ? 1 : (PadState.IsKeyPressed(JOYKEYS.Right, Main.prepadstat) ? 1 : 0))) != 0)
                    {
                        Program.game.entrance.PlaySound("select");
                        ++selection2;
                        if (selection2 == 5)
                        {
                            selection2 = 1;
                        }
                    }
                    else if (Main.keyboardstat.IsKeyDown(Keys.X) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Escape) & Main.keyboardstat != Main.prekeyboard || (PadState.IsKeyPressed(JOYKEYS.Special, Main.prepadstat) || PadState.IsKeyPressed(JOYKEYS.Pause, Main.prepadstat)))
                    {
                        for (int index = 0; index < 5; ++index)
                        {
                            fixed(float *v = &level[index].position.X)
                            {
                                ValueEvent valueEvent = new ValueEvent(v, (80 - (selection - 1 - index) * 100), 10, ChangeType.NONLINEAR);
                            }
                        }

                        fixed(float *v = &cinfo.color.a)
                        {
                            ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.NONLINEAR);
                        }

                        fixed(float *v = &cinfo.position.X)
                        {
                            ValueEvent valueEvent = new ValueEvent(v, 100f, 10, ChangeType.NONLINEAR);
                        }

                        Program.game.entrance.PlaySound("cancel");
                        steps             = false;
                        time              = 0;
                        time2             = 0;
                        Main.keyboardstat = Main.prekeyboard;
                    }
                    if (Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat))
                    {
                        Program.game.entrance.PlaySound("ok");
                        Main.Character = (Cname)selection2;
                        //    Main.Character=Cname.SANAE;
                        steps2     = true;
                        selection3 = 1;
                        time3      = 0;
                        blackpos.X = 249f;
                    }
                }
                if (steps2)
                {
                    if (time3 <= 20)
                    {
                        if (time3 == 0)
                        {
                            stage = practicedata.clearstate[selection2 - 1][selection - 1];
                            //    stage=6;
                            if (stage == 7)
                            {
                                selection3 = 7;
                            }
                        }

                        fixed(float *v = &blackpos.X)
                        {
                            ValueEvent valueEvent = new ValueEvent(v, 199f, 10, ChangeType.NONLINEAR);
                        }

                        blacka += 0.035f;
                        if (blacka >= 0.699999988079071)
                        {
                            blacka = 0.7f;
                        }
                        worda += 0.05f;
                    }
                    else if (!ok)
                    {
                        if (Main.keyboardstat.IsKeyDown(Keys.X) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Escape) & Main.keyboardstat != Main.prekeyboard || (PadState.IsKeyPressed(JOYKEYS.Special, Main.prepadstat) || PadState.IsKeyPressed(JOYKEYS.Pause, Main.prepadstat)))
                        {
                            time3  = 0;
                            steps2 = false;
                            fixed(float *v = &blacka)
                            {
                                ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR);
                            }

                            fixed(float *v = &worda)
                            {
                                ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR);
                            }

                            Program.game.entrance.PlaySound("cancel");
                        }
                        if ((Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat)) && stage != 7)
                        {
                            --selection3;
                            if (selection3 < 1)
                            {
                                selection3 = stage;
                            }
                            Program.game.entrance.PlaySound("select");
                        }
                        if ((Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat)) && stage != 7)
                        {
                            ++selection3;
                            if (selection3 > stage)
                            {
                                selection3 = 1;
                            }
                            Program.game.entrance.PlaySound("select");
                        }
                        if ((Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat)) && stage != 0)
                        {
                            Program.game.entrance.PlaySound("ok");
                            ok = true;
                            fixed(float *v = &blacka)
                            {
                                ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR);
                            }

                            fixed(float *v = &worda)
                            {
                                ValueEvent valueEvent = new ValueEvent(v, 0.0f, 10, ChangeType.LINEAR);
                            }
                        }
                    }
                    ++time3;
                }
            }
            ++time;
            if (!steps)
            {
                return;
            }
            ++time2;
        }