Ejemplo n.º 1
0
        public void Update(CSManager csm, EnemyManager e, Boss b)
        {
            praticle.posrect = new Vector4(body.position.X, body.position.Y, 0.0f, 0.0f);
            equip.Update(b, e, type, mattribute.CHILDREN, eqlevel, body.position, Dis | Ban | BanShoot);
            SelfBarrageManager.Update(e, b, this);
            ++f;
            if (f % 3 == 0)
            {
                if (flash <= 40)
                {
                    ++flash;
                }
                if (flash % 2 == 0)
                {
                    body.color.r = 0.0f;
                    body.color.g = 0.0f;
                }
                else
                {
                    body.color.r = 1f;
                    body.color.g = 1f;
                }
            }
            if (f == 6)
            {
                f = 0;
                ++ani;
                if (ani == 7)
                {
                    ani = 0;
                }
            }
            eqlevel  = Program.game.game.Point / 50;
            runtime += Time.Stop;
            if (body.position.X >= rangex.X && body.position.X <= rangex.Y && (body.position.Y >= rangey.X && body.position.Y <= rangey.Y))
            {
                int num1 = -1;
                if (!Dis)
                {
                    if (Main.IsKeyDown(Keys.Up) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Up))
                    {
                        num1   = -90;
                        change = false;
                    }
                    if (Main.IsKeyDown(Keys.Down) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Down))
                    {
                        num1   = 90;
                        change = false;
                    }
                    if (Main.IsKeyDown(Keys.Left) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Left))
                    {
                        num1 = 180;
                        if (Main.IsKeyDown(Keys.Up) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Up))
                        {
                            num1 = 225;
                        }
                        if (Main.IsKeyDown(Keys.Down) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Down))
                        {
                            num1 = 135;
                        }
                    }
                    if (Main.IsKeyDown(Keys.Right) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Right))
                    {
                        num1 = 0;
                        if (Main.IsKeyDown(Keys.Up) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Up))
                        {
                            num1 = -45;
                        }
                        if (Main.IsKeyDown(Keys.Down) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Down))
                        {
                            num1 = 45;
                        }
                    }
                }
                if (num1 != -1)
                {
                    if (runtime - runtimebf >= 1.0)
                    {
                        if (num1 == 225 || num1 == 135 || (num1 == 180 || num1 == 0) || (num1 == -45 || num1 == 45))
                        {
                            ansave = num1;
                            change = true;
                            f3     = 1;
                            ++f2;
                            if (f2 == 3)
                            {
                                switch (num1)
                                {
                                case -45:
                                case 0:
                                case 45:
                                    body.rect = new Rectangle(660, (int)(type - 1) * 60, 60, 60);
                                    break;

                                case 135:
                                case 180:
                                case 225:
                                    body.rect = new Rectangle(420, (int)(type - 1) * 60, 60, 60);
                                    break;
                                }
                            }
                            else if (f2 == 7)
                            {
                                ++ani2;
                                if (ani2 >= 4)
                                {
                                    ani2 = 1;
                                }
                                switch (num1)
                                {
                                case -45:
                                case 0:
                                case 45:
                                    body.rect = new Rectangle((11 + ani2) * 60, (int)(type - 1) * 60, 60, 60);
                                    break;

                                case 135:
                                case 180:
                                case 225:
                                    body.rect = new Rectangle((7 + ani2) * 60, (int)(type - 1) * 60, 60, 60);
                                    break;
                                }
                                f2 = 4;
                            }
                        }
                        else
                        {
                            change = false;
                        }
                    }
                    float num2;
                    if (Main.IsKeyDown(Keys.LeftShift) || Main.IsKeyDown(Keys.RightShift) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Slow))
                    {
                        num2    = Characters.attribute[(int)(type - 1 + 4)].MOVE * 0.5f * speedadd.X;
                        shifted = true;
                    }
                    else
                    {
                        num2 = (float)(1.0 + Characters.attribute[(int)(type - 1)].MOVE * 0.5 * speedadd.Y);
                    }
                    body.position.X = MathHelper.Clamp(body.position.X + num2 * (float)Math.Cos(num1 * Math.PI / 180.0) * Time.Stop, rangex.X, rangex.Y);
                    body.position.Y = MathHelper.Clamp(body.position.Y + num2 * (float)Math.Sin(num1 * Math.PI / 180.0) * Time.Stop, rangey.X, rangey.Y);
                }
                else
                {
                    change = false;
                    f2     = 0;
                    ani2   = 0;
                }
                if (runtime - runtimebf >= 1.0)
                {
                    if (!change && f3 == 0)
                    {
                        body.rect = new Rectangle(ani * 60, (int)(type - 1) * 60, 60, 60);
                    }
                    else if (!change && f3 >= 1)
                    {
                        if (ansave == 225 || ansave == 135 || ansave == 180)
                        {
                            body.rect = new Rectangle(420, (int)(type - 1) * 60, 60, 60);
                        }
                        else if (ansave == 0 || ansave == -45 || ansave == 45)
                        {
                            body.rect = new Rectangle(660, (int)(type - 1) * 60, 60, 60);
                        }
                        ++f3;
                        if (f3 == 4)
                        {
                            f3 = 0;
                        }
                    }
                    runtimebf = runtime;
                }
                Program.game.achivmanager.Check(AchievementType.Hidden, 3, new Hashtable()
                {
                    ["itemline"] = Main.gn.Itemline[(int)(Main.Character - 1)],
                    ["y"]        = body.position.Y
                });
            }
            if ((Dis || free) && Time.Stop == 1.0)
            {
                ++time;
                if (time > 30 && time <= 100)
                {
                    for (int index = 0; index < e.EnemyArray.Count; ++index)
                    {
                        if (!e.EnemyArray[index].IsInWudi() && !e.EnemyArray[index].die && (e.EnemyArray[index].hp > 0 && !Main.IsOut(e.EnemyArray[index].Position)) && Math.Sqrt((e.EnemyArray[index].Position.X - body.position.X) * (e.EnemyArray[index].Position.X - body.position.X) + (e.EnemyArray[index].Position.Y - body.position.Y) * (e.EnemyArray[index].Position.Y - body.position.Y)) < Math.Abs((time - 10) * 10))
                        {
                            e.EnemyArray[index].deadkill = true;
                            e.EnemyArray[index].hp      -= 2;
                        }
                    }
                }
                if (time == 1)
                {
                    Program.game.achivmanager.Check(AchievementType.Challenge, 9, new Hashtable()
                    {
                        ["missorjust"] = true
                    });
                    CrazyStorm crazyStorm = Program.game.game.PlayEffect(true, "14", new Vector2(body.position.X + 93f, body.position.Y - 13f));
                    crazyStorm.BanSound(true);
                    crazyStorm.effect = true;
                    Program.game.game.PlaySound("pldead00", true, body.position.X);
                    body.color.a = 0.0f;
                }
                else if (time == 30)
                {
                    if (Program.game.game.Point >= 50)
                    {
                        Program.game.game.DeathItem();
                    }
                    Program.game.game.SpecialSystemReset();
                    dead     = true;
                    havedead = true;
                    Program.game.game.Life -= 5;
                    if (Program.game.game.Bomb < 10)
                    {
                        Program.game.game.Bomb = 10 + Program.game.game.Bomb % 5;
                    }
                    if (Program.game.game.Life == 0)
                    {
                        Program.game.game.Life = 0;
                        if (!makeup)
                        {
                            Program.game.game.Point = 150;
                        }
                        makeup = true;
                    }
                    else if (Program.game.game.Life < 0)
                    {
                        alreadycal = true;
                        Program.game.game.PlaySound("pldead01", true, body.position.X);
                        Program.game.game.Life     = -5;
                        Program.game.game.Bomb     = 0;
                        Program.game.game.BanPause = true;
                        makeup = false;
                    }
                }
                else if (time > 30)
                {
                    if (time == 31)
                    {
                        body.position.X = 224f;
                        body.position.Y = 510f;
                    }
                    else if (Program.game.game.Life >= 0 && body.position.Y > 420.0 && !free)
                    {
                        body.position.Y -= 2f;
                        if (body.position.Y <= 420.0)
                        {
                            body.position.Y = 420f;
                        }
                    }
                    if (Program.game.game.Life >= 0)
                    {
                        if (time % 6 < 3)
                        {
                            body.color.r = 0.0f;
                            body.color.g = 0.0f;
                        }
                        else
                        {
                            body.color.r = 1f;
                            body.color.g = 1f;
                        }
                    }
                    body.color.a = 1f;
                }
                if (time == 95)
                {
                    if (!alreadycal)
                    {
                        Program.game.game.AddStgData(1, 0, 0);
                    }
                    else
                    {
                        alreadycal = false;
                    }
                    Dis  = false;
                    free = true;
                    if (Program.game.game.Life == -5)
                    {
                        free = false;
                        Dis  = true;
                        time = 50;
                        Program.game.game.DeathProcess();
                    }
                }
                if (time > 280)
                {
                    free = false;
                    time = 0;
                }
            }
            if (!Ban && !Dis && !BanShoot | type == Cname.PATCHOULI && (Main.IsKeyDown(Keys.Z) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Confirm)))
            {
                BEquipShoot(selfb, type, mattribute.BODY, body.position);
                shot = true;
            }
            if (bomb != null && !bomb.Die)
            {
                bomb.Update(this, csm, e, b);
            }
            else if (bomb != null)
            {
                bomb = null;
                Wudi = false;
                Auto = false;
            }
            int num = type != Cname.SANAE || Main.Mode != Modes.SINGLE || (Main.IsKeyDown(Keys.LeftShift) || Main.IsKeyDown(Keys.RightShift)) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Slow) ? 5 : 3;

            if (!Ban && (jue <= 10 || free) && (Program.game.game.Bomb >= num && bomb == null) && ((Main.IsKeyPressed(Keys.X) || !Main.Replay && PadState.IsKeyPressed(JOYKEYS.Special, Main.prepadstat)) && Time.Stop != 0.0))
            {
                bombed     = true;
                BanShoot   = true;
                body.color = new Colors(1f, 1f, 1f, 1f);
                if (b != null)
                {
                    Program.game.game.AddStgData(0, 1, 0);
                }
                Program.game.game.Bomb -= num;
                if (Program.game.game.Bomb <= 0)
                {
                    Program.game.game.Bomb = 0;
                }
                if (!free)
                {
                    Dis  = false;
                    time = 0;
                    Program.game.achivmanager.Check(AchievementType.Challenge, 9, new Hashtable()
                    {
                        ["missorjust"] = false
                    });
                }
                Program.game.game.PlaySound("slash", true, body.position.X);
                bomb = new SingleBomb(type, body.position + new Vector2(93f, -13f));
                Wudi = true;
                Auto = true;
            }
            if (Dis || free)
            {
                ++jue;
            }
            else
            {
                jue = 0;
            }
            if (itemm == null)
            {
                return;
            }
            foreach (ItemManager itemManager in itemm)
            {
                if (!Dis)
                {
                    itemManager.Ban(false);
                }
                else
                {
                    itemManager.Ban(true);
                }
                itemManager.Transpos(body.position.X, body.position.Y);
            }
        }
Ejemplo n.º 2
0
Archivo: SPECIAL.cs Proyecto: THSJF/sjf
        public void Update()
        {
            for (int index = 0; index < this.button.Length; ++index)
            {
                if (this.time >= index * 3 && this.time < 10 + index * 3)
                {
                    this.button[index].color.a      += 0.1f;
                    this.button[index].position.X   += 3f;
                    this.buttonon[index].color.a    += 0.1f;
                    this.buttonon[index].position.X += 3f;
                }
            }
            if (!this.step && !this.fadeout && this.time >= 32)
            {
                if (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat))
                {
                    Program.game.entrance.PlaySound("select");
                    --this.selection;
                    if (this.cleared)
                    {
                        if (this.selection < 0)
                        {
                            this.selection = 3;
                        }
                    }
                    else if (this.selection < 1)
                    {
                        this.selection = 3;
                    }
                }
                else if (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat))
                {
                    Program.game.entrance.PlaySound("select");
                    ++this.selection;
                    if (this.cleared)
                    {
                        if (this.selection > 3)
                        {
                            this.selection = 0;
                        }
                    }
                    else if (this.selection > 3)
                    {
                        this.selection = 1;
                    }
                }
                if (Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat))
                {
                    Program.game.entrance.PlaySound("ok");
                    switch (this.selection)
                    {
                    case 0:
                        this.fadeout = true;
                        break;

                    case 1:
                        this.achivs = this.LoadAchievementList("Content/Data/9.xna");
                        this.step   = true;
                        break;

                    case 2:
                        this.step = true;
                        break;

                    case 3:
                        this.fadeout = true;
                        break;
                    }
                }
                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.selection = 3;
                }
                this.buttonon[this.selection].color.a = 1f;
            }
            if (this.step)
            {
                if ((double)this.ccolor > 0.0)
                {
                    this.ccolor -= 0.05f;
                }
                for (int index = 0; index < 4; ++index)
                {
                    if (index == this.cselection)
                    {
                        if ((double)this.character[index].color.a > 0.0)
                        {
                            this.character[index].color.a -= 0.05f;
                        }
                    }
                    else
                    {
                        this.character[index].color.a = 0.0f;
                    }
                }
                for (int index = 0; index < this.button.Length; ++index)
                {
                    if (this.steptime >= index * 3 && this.steptime < 10 + index * 3)
                    {
                        this.button[index].color.a      -= 0.1f;
                        this.button[index].position.X   -= 3f;
                        this.buttonon[index].color.a    -= 0.1f;
                        this.buttonon[index].position.X -= 3f;
                    }
                }
                if (this.selection == 2)
                {
                    if (this.steptime == 0)
                    {
                        this.cselection = (int)(Main.Character - 1);
                    }
                    for (int index = 0; index < 4; ++index)
                    {
                        if (index == this.cselection)
                        {
                            if ((double)this.character[index].color.a < 1.0)
                            {
                                this.character[index].color.a += 0.1f;
                            }
                        }
                        else
                        {
                            this.character[index].color.a = 0.0f;
                        }
                    }
                    if ((double)this.wordalpha < 1.0)
                    {
                        this.wordalpha += 0.05f;
                    }
                    if (this.steptime >= 32)
                    {
                        if (!this.step2)
                        {
                            if (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat))
                            {
                                Program.game.entrance.PlaySound("select");
                                --this.selection2;
                                if (this.selection2 < 0)
                                {
                                    this.selection2 = 6;
                                }
                            }
                            else if (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat))
                            {
                                Program.game.entrance.PlaySound("select");
                                ++this.selection2;
                                if (this.selection2 > 6)
                                {
                                    this.selection2 = 0;
                                }
                            }
                            if (Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat))
                            {
                                Program.game.entrance.PlaySound("ok");
                                this.scname = this.LoadSpellCardList("Content/Data/7.xna");
                                bool flag = false;
                                if (this.selection2 < 5)
                                {
                                    for (int index1 = 0; index1 < this.prdata.clearstate.Length; ++index1)
                                    {
                                        for (int index2 = 0; index2 < this.prdata.clearstate[index1].Length - 1; ++index2)
                                        {
                                            if (this.prdata.clearstate[index1][index2] > this.selection2 + 1)
                                            {
                                                flag = true;
                                                break;
                                            }
                                        }
                                    }
                                }
                                else if (this.selection2 == 5)
                                {
                                    for (int index = 0; index < this.prdata.clear.Length; ++index)
                                    {
                                        if (this.prdata.clear[index])
                                        {
                                            flag = true;
                                            break;
                                        }
                                    }
                                }
                                if (this.selection2 == 6)
                                {
                                    for (int index = 0; index < this.pdata.players.Length; ++index)
                                    {
                                        if (this.pdata.players[index].sc[4].Count >= (int)Main.SpellcardNum[4])
                                        {
                                            flag = true;
                                            break;
                                        }
                                    }
                                }
                                if (flag)
                                {
                                    this.selection3range = this.scname[this.selection2].Split('^').Length - 2;
                                }
                                else
                                {
                                    this.selection3range = 0;
                                }
                                this.step2 = 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)))
                            {
                                Program.game.entrance.PlaySound("cancel");
                                this.step       = false;
                                this.time       = 0;
                                this.steptime   = 0;
                                this.selection2 = 0;
                            }
                        }
                        if (Main.keyboardstat.IsKeyDown(Keys.Left) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Left, Main.prepadstat))
                        {
                            Program.game.entrance.PlaySound("select");
                            --this.cselection;
                            if (this.cselection < 0)
                            {
                                this.cselection = 3;
                            }
                        }
                        else if (Main.keyboardstat.IsKeyDown(Keys.Right) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Right, Main.prepadstat))
                        {
                            Program.game.entrance.PlaySound("select");
                            ++this.cselection;
                            if (this.cselection > 3)
                            {
                                this.cselection = 0;
                            }
                        }
                    }
                    if (this.step2)
                    {
                        if ((double)this.ccolor < 0.5)
                        {
                            this.ccolor += 0.1f;
                        }
                        ++this.step2time;
                        if (this.step2time > 1 && !this.fadeout)
                        {
                            if (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat))
                            {
                                Program.game.entrance.PlaySound("select");
                                --this.selection3;
                                if (this.selection3 < 0)
                                {
                                    this.selection3 = this.selection3range;
                                }
                            }
                            else if (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat))
                            {
                                Program.game.entrance.PlaySound("select");
                                ++this.selection3;
                                if (this.selection3 > this.selection3range)
                                {
                                    this.selection3 = 0;
                                }
                            }
                            if (Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat))
                            {
                                if (this.selection3range != 0)
                                {
                                    Program.game.entrance.PlaySound("ok");
                                    string[] strArray = this.scname[this.selection2].Split('^');
                                    for (int index = 0; index < strArray.Length - 1; ++index)
                                    {
                                        if (this.selection3 == index)
                                        {
                                            this.scselection = strArray[index].Split(' ')[1] + " " + strArray[index].Split(' ')[2];
                                        }
                                    }
                                    Main.Character = (Cname)(this.cselection + 1);
                                    this.fadeout   = 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)))
                            {
                                Program.game.entrance.PlaySound("cancel");
                                this.step2      = false;
                                this.step2time  = 0;
                                this.selection3 = 0;
                            }
                        }
                    }
                }
                else if (this.selection == 1)
                {
                    if ((double)this.wordalpha < 1.0)
                    {
                        this.wordalpha += 0.05f;
                    }
                    if (this.steptime >= 32)
                    {
                        if (Main.keyboardstat.IsKeyDown(Keys.Left) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Left, Main.prepadstat))
                        {
                            Program.game.entrance.PlaySound("select");
                            --this.selection3;
                            if (this.selection3 < 0)
                            {
                                this.selection3 = 2;
                            }
                            this.selection2 = 0;
                            this.step2      = false;
                        }
                        else if (Main.keyboardstat.IsKeyDown(Keys.Right) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Right, Main.prepadstat))
                        {
                            Program.game.entrance.PlaySound("select");
                            ++this.selection3;
                            if (this.selection3 > 2)
                            {
                                this.selection3 = 0;
                            }
                            this.selection2 = 0;
                            this.step2      = false;
                        }
                        if (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat))
                        {
                            Program.game.entrance.PlaySound("select");
                            --this.selection2;
                            if (this.selection2 < 0)
                            {
                                this.selection2 = this.achivs[this.selection3].Length - 1;
                            }
                            this.step2 = false;
                        }
                        else if (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat))
                        {
                            Program.game.entrance.PlaySound("select");
                            ++this.selection2;
                            if (this.selection2 > this.achivs[this.selection3].Length - 1)
                            {
                                this.selection2 = 0;
                            }
                            this.step2 = false;
                        }
                        if (Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat))
                        {
                            Program.game.entrance.PlaySound("ok");
                            this.step2 = !this.step2;
                        }
                        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.step       = false;
                            this.step2      = false;
                            this.steptime   = 0;
                            this.time       = 0;
                            this.selection2 = 0;
                            this.selection3 = 0;
                        }
                    }
                }
                ++this.steptime;
            }
            else
            {
                if ((double)this.wordalpha > 0.0)
                {
                    this.wordalpha -= 0.1f;
                }
                if ((double)this.character[this.cselection].color.a > 0.0)
                {
                    this.character[this.cselection].color.a -= 0.1f;
                }
            }
            if (this.fadeout)
            {
                if (this.ftime >= 20)
                {
                    for (int index = 0; index < 4; ++index)
                    {
                        this.character[index].position = new Vector2(200f, 0.0f);
                        this.character[index].color.a  = 0.0f;
                    }
                }
                if (Main.SkiptoSCChanllenges)
                {
                    Main.SkiptoSCChanllenges = false;
                }
                if (this.selection == 3)
                {
                    for (int index = 0; index < this.button.Length; ++index)
                    {
                        if (this.ftime >= index * 3 && this.ftime < 10 + index * 3)
                        {
                            this.button[index].color.a      -= 0.1f;
                            this.button[index].position.X   -= 3f;
                            this.buttonon[index].color.a    -= 0.1f;
                            this.buttonon[index].position.X -= 3f;
                        }
                    }
                    if (this.ftime >= 20)
                    {
                        this.finished = true;
                    }
                }
                else if (this.selection == 2)
                {
                    if ((double)this.wordalpha > 0.0)
                    {
                        this.wordalpha -= 0.1f;
                    }
                    this.black.color.a += 0.05f;
                    if (this.ftime >= 20)
                    {
                        this.finished = true;
                    }
                }
                else if (this.selection == 0)
                {
                    this.black.color.a += 0.05f;
                    if (this.ftime >= 20)
                    {
                        this.finished = true;
                    }
                }
                ++this.ftime;
            }
            ++this.time;
        }
Ejemplo n.º 3
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;
        }
Ejemplo n.º 4
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;
        }
Ejemplo n.º 5
0
Archivo: ED.cs Proyecto: THSJF/sjf
 public void ContinueUpdate()
 {
     if (this.time > 20 && this.time < 40)
     {
         this.dialogbg.color.a += 0.05f;
     }
     else
     {
         if (this.time < 140)
         {
             return;
         }
         if (!this.dialogfinish)
         {
             this.time = 140;
             for (int index = 0; index < this.dialog.Length; ++index)
             {
                 if (index == this.dialogt)
                 {
                     this.dialog[index].color.a += 0.05f;
                     if ((double)this.dialog[index].color.a >= 1.0)
                     {
                         this.dialog[index].color.a = 1f;
                     }
                 }
                 else
                 {
                     this.dialog[index].color.a -= 0.05f;
                     if ((double)this.dialog[index].color.a <= 0.0)
                     {
                         this.dialog[index].color.a = 0.0f;
                     }
                 }
             }
             ++this.dialogtime;
             if (this.dialogtime < 60 || !(Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard) && !(Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard) && !PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat))
             {
                 return;
             }
             ++this.dialogt;
             if (this.dialogt > this.dialog.Length - 1)
             {
                 this.dialogfinish = true;
             }
             this.dialogtime = 0;
         }
         else if (this.time > 140 && this.time <= 160)
         {
             for (int index = 0; index < this.dialog.Length; ++index)
             {
                 this.dialog[index].color.a -= 0.05f;
                 if ((double)this.dialog[index].color.a <= 0.0)
                 {
                     this.dialog[index].color.a = 0.0f;
                 }
             }
             this.dialogbg.color.a -= 0.05f;
         }
         else if (this.time > 160 && !this.record.Ok)
         {
             this.record.Update();
             if (this.record.Ok)
             {
                 this.SavePlayData(this.record.Playdata);
             }
             this.time = 161;
         }
         else if (this.time > 160 && this.time <= 180)
         {
             this.tip.color.a += 0.05f;
         }
         else if (this.time > 270 && this.time <= 290)
         {
             this.tip.color.a -= 0.05f;
         }
         else
         {
             if (this.time <= 290)
             {
                 return;
             }
             BGM.Disposes();
             Program.game.StopSound("Result bank");
             Main.stage    = "ENTRANCE";
             this.Finished = true;
         }
     }
 }
Ejemplo n.º 6
0
Archivo: ED.cs Proyecto: THSJF/sjf
 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;
 }
Ejemplo n.º 7
0
 public void Update()
 {
     this.worda += 0.1f;
     if ((double)this.worda >= 1.0)
     {
         this.worda = 1f;
     }
     if (this.step)
     {
         if (Main.keyboardstat.IsKeyDown(Keys.Left) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Left, Main.prepadstat))
         {
             Program.game.PlaySound("select");
             --this.selection2;
             if (this.selection2 < 0)
             {
                 this.selection2 = 0;
             }
         }
         else if (Main.keyboardstat.IsKeyDown(Keys.Right) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Right, Main.prepadstat))
         {
             Program.game.PlaySound("select");
             ++this.selection2;
             if (this.selection2 > this.kyboard.Length - 1)
             {
                 this.selection2 = this.kyboard.Length - 1;
             }
         }
         else if (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat))
         {
             Program.game.PlaySound("select");
             if (this.selection2 - 13 >= 0)
             {
                 this.selection2 -= 13;
             }
             else
             {
                 this.selection2 = this.kyboard.Length - 1 - (12 - this.selection2);
             }
         }
         else if (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat))
         {
             Program.game.PlaySound("select");
             if (this.selection2 + 13 <= this.kyboard.Length - 1)
             {
                 this.selection2 += 13;
             }
             else
             {
                 this.selection2 = 12 - (this.kyboard.Length - 1 - this.selection2);
             }
         }
         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.selection2 <= 61 && this.nametemp.Length < 8)
             {
                 Program.game.PlaySound("ok");
                 this.nametemp += this.kyboard[this.selection2];
                 this.playdata.players[(int)(Main.Character - 1)].ranks[(int)(Main.Level - 1)].data[this.selection].name = this.nametemp + "_";
             }
             else if (this.selection2 == 62 && this.nametemp.Length < 8)
             {
                 Program.game.PlaySound("ok");
                 this.nametemp += " ";
                 this.playdata.players[(int)(Main.Character - 1)].ranks[(int)(Main.Level - 1)].data[this.selection].name = this.nametemp + "_";
             }
             if (this.selection2 == 63)
             {
                 this.BackSpace();
             }
             else if (this.selection2 == 64)
             {
                 this.Save();
             }
         }
         else if (Main.keyboardstat.IsKeyDown(Keys.X) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Escape) & Main.keyboardstat != Main.prekeyboard || (PadState.IsKeyPressed(JOYKEYS.Pause, Main.prepadstat) || PadState.IsKeyPressed(JOYKEYS.Special, Main.prepadstat)))
         {
             this.BackSpace();
         }
     }
     ++this.time;
 }
Ejemplo n.º 8
0
 public void Update()
 {
     if (this.time < 22)
     {
         this.blackalpha += 0.03f;
         if ((double)this.blackalpha >= 0.600000023841858)
         {
             this.blackalpha = 0.6f;
         }
         this.playdata.color.a += 0.05f;
         if ((double)this.playdata.color.a >= 1.0)
         {
             this.playdata.color.a = 1f;
         }
         this.crapwise.color.a += 0.05f;
         if ((double)this.crapwise.color.a >= 1.0)
         {
             this.crapwise.color.a = 1f;
         }
         this.leveldata.color.a += 0.05f;
         if ((double)this.leveldata.color.a >= 1.0)
         {
             this.leveldata.color.a = 1f;
         }
         this.playerdata.color.a += 0.05f;
         if ((double)this.playerdata.color.a >= 1.0)
         {
             this.playerdata.color.a = 1f;
         }
     }
     else if (this.time == 22)
     {
         PracticeData practiceData = this.LoadPracticeData();
         Hashtable    data1        = new Hashtable();
         data1[(object)"ok"] = (object)false;
         for (int index = 0; index < 4; ++index)
         {
             if (this.pdata.players[index].cleartime > 0)
             {
                 data1[(object)"ok"] = (object)true;
                 break;
             }
         }
         Program.game.achivmanager.Check(AchievementType.Normal, 2, data1);
         Program.game.achivmanager.Check(AchievementType.Normal, 3, new Hashtable()
         {
             [(object)"practice"] = (object)practiceData
         });
         Program.game.achivmanager.Check(AchievementType.Normal, 5, new Hashtable()
         {
             [(object)"practice"] = (object)practiceData
         });
         Hashtable data2 = new Hashtable();
         data2[(object)"playdata"] = (object)this.pdata;
         Program.game.achivmanager.Check(AchievementType.Challenge, 14, data2);
         Program.game.achivmanager.Check(AchievementType.Hidden, 0, data2);
         Program.game.achivmanager.Check(AchievementType.Hidden, 5, new Hashtable()
         {
             [(object)"playerdata"] = (object)this.pdata.players
         });
     }
     if (this.time >= 22 && this.time < 32)
     {
         this.worda += 0.1f;
         if ((double)this.worda >= 1.0)
         {
             this.worda = 1f;
         }
     }
     if (!this.fadeout && 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.player;
             if (this.player < 0)
             {
                 this.player = 3;
             }
         }
         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.player;
             if (this.player > 3)
             {
                 this.player = 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.level;
             if (this.level < 0)
             {
                 this.level = 4;
             }
         }
         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.level;
             if (this.level > 4)
             {
                 this.level = 0;
             }
         }
         if (Main.keyboardstat.IsKeyDown(Keys.Z) & Main.keyboardstat != Main.prekeyboard || Main.keyboardstat.IsKeyDown(Keys.Enter) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Confirm, Main.prepadstat))
         {
             Program.game.entrance.PlaySound("select");
             if (!this.showsc)
             {
                 this.showsc = true;
             }
             else if (this.scpage < this.pdata.players[this.player].sc[this.level].Count / 10)
             {
                 ++this.scpage;
             }
             else
             {
                 this.scpage = 0;
                 this.showsc = false;
             }
         }
         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.fadeout)
     {
         this.worda -= 0.1f;
         if ((double)this.worda <= 0.0)
         {
             this.worda = 0.0f;
         }
         this.blackalpha -= 0.03f;
         if ((double)this.blackalpha <= 0.0)
         {
             this.blackalpha = 0.0f;
         }
         this.playdata.color.a -= 0.05f;
         if ((double)this.playdata.color.a <= 0.0)
         {
             this.playdata.color.a = 0.0f;
         }
         this.crapwise.color.a -= 0.05f;
         if ((double)this.crapwise.color.a <= 0.0)
         {
             this.crapwise.color.a = 0.0f;
         }
         this.leveldata.color.a -= 0.05f;
         if ((double)this.leveldata.color.a <= 0.0)
         {
             this.leveldata.color.a = 0.0f;
         }
         this.playerdata.color.a -= 0.05f;
         if ((double)this.playerdata.color.a <= 0.0)
         {
             this.playerdata.color.a = 0.0f;
         }
     }
     ++this.time;
 }
Ejemplo n.º 9
0
 public void Update()
 {
     this.worda += 0.1f;
     if ((double)this.worda >= 1.0)
     {
         this.worda = 1f;
     }
     if (this.time > 10 && !this.ok && !this.step)
     {
         if (Main.keyboardstat.IsKeyDown(Keys.Left) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Left, Main.prepadstat))
         {
             Program.game.PlaySound("select");
             --this.page;
             if (this.page < 0)
             {
                 this.page = 2;
             }
         }
         else if (Main.keyboardstat.IsKeyDown(Keys.Right) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Right, Main.prepadstat))
         {
             Program.game.PlaySound("select");
             ++this.page;
             if (this.page > 2)
             {
                 this.page = 0;
             }
         }
         else if (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat))
         {
             Program.game.PlaySound("select");
             --this.selection;
             if (this.selection < 0)
             {
                 this.selection = 14;
             }
         }
         else if (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat))
         {
             Program.game.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))
         {
             Program.game.PlaySound("ok");
             if (this.rpys[this.page * 15 + this.selection] != null)
             {
                 this.rpytemp = new RPYInfo();
                 this.rpytemp.SetVersion(Main.rpyversion);
                 this.rpytemp.SetChara(this.rpys[this.page * 15 + this.selection].Chara);
                 this.rpytemp.SetName(this.rpys[this.page * 15 + this.selection].Name);
                 this.rpytemp.SetTime(this.rpys[this.page * 15 + this.selection].Time);
                 this.rpytemp.SetLevel(this.rpys[this.page * 15 + this.selection].Level);
                 this.rpytemp.SetScore(this.rpys[this.page * 15 + this.selection].Score);
                 this.rpytemp.SetMode(this.rpys[this.page * 15 + this.selection].Mode);
                 this.rpytemp.SetSpecialMode(this.rpys[this.page * 15 + this.selection].SpecialMode);
             }
             this.rpys[this.page * 15 + this.selection] = new RPYInfo();
             this.rpys[this.page * 15 + this.selection].SetVersion(Main.rpyversion);
             this.rpys[this.page * 15 + this.selection].SetName(this.nametemp + "_");
             this.rpys[this.page * 15 + this.selection].SetScore(this.score);
             this.rpys[this.page * 15 + this.selection].SetMode((byte)Main.Mode);
             this.rpys[this.page * 15 + this.selection].SetSpecialMode((byte)Main.SpecialMode);
             this.rpys[this.page * 15 + this.selection].SetChara((byte)this.chara);
             this.rpys[this.page * 15 + this.selection].SetLevel((byte)this.level);
             if (this.spellcard)
             {
                 this.rpys[this.page * 15 + this.selection].SetLevel((byte)5);
                 this.rpys[this.page * 15 + this.selection].SetMode((byte)this.bossstage);
                 this.rpys[this.page * 15 + this.selection].SetSpecialMode((byte)this.barrageid);
             }
             DateTime now = DateTime.Now;
             this.rpys[this.page * 15 + this.selection].SetTime(now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second);
             this.step       = true;
             this.selection2 = 64;
             if (this.nametemp == "")
             {
                 this.selection2 = 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.PlaySound("cancel");
             this.ok = true;
         }
     }
     else if (this.time > 10 && !this.ok && this.step)
     {
         if (Main.keyboardstat.IsKeyDown(Keys.Left) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Left, Main.prepadstat))
         {
             Program.game.PlaySound("select");
             --this.selection2;
             if (this.selection2 < 0)
             {
                 this.selection2 = 0;
             }
         }
         else if (Main.keyboardstat.IsKeyDown(Keys.Right) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Right, Main.prepadstat))
         {
             Program.game.PlaySound("select");
             ++this.selection2;
             if (this.selection2 > this.kyboard.Length - 1)
             {
                 this.selection2 = this.kyboard.Length - 1;
             }
         }
         else if (Main.keyboardstat.IsKeyDown(Keys.Up) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Up, Main.prepadstat))
         {
             Program.game.PlaySound("select");
             if (this.selection2 - 13 >= 0)
             {
                 this.selection2 -= 13;
             }
             else
             {
                 this.selection2 = this.kyboard.Length - 1 - (12 - this.selection2);
             }
         }
         else if (Main.keyboardstat.IsKeyDown(Keys.Down) & Main.keyboardstat != Main.prekeyboard || PadState.IsKeyPressed(JOYKEYS.Down, Main.prepadstat))
         {
             Program.game.PlaySound("select");
             if (this.selection2 + 13 <= this.kyboard.Length - 1)
             {
                 this.selection2 += 13;
             }
             else
             {
                 this.selection2 = 12 - (this.kyboard.Length - 1 - this.selection2);
             }
         }
         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.start)
             {
                 if (this.selection2 <= 61 && this.nametemp.Length < 8)
                 {
                     Program.game.PlaySound("ok");
                     this.nametemp += this.kyboard[this.selection2];
                     this.rpys[this.page * 15 + this.selection].SetName(this.nametemp + "_");
                 }
                 else if (this.selection2 == 62 && this.nametemp.Length < 8)
                 {
                     Program.game.PlaySound("ok");
                     this.nametemp += " ";
                     this.rpys[this.page * 15 + this.selection].SetName(this.nametemp + "_");
                 }
             }
             this.start = true;
             if (this.selection2 == 63)
             {
                 this.BackSpace();
             }
             else if (this.selection2 == 64)
             {
                 this.Save();
             }
         }
         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)))
         {
             this.BackSpace();
         }
     }
     ++this.time;
 }