コード例 #1
0
        public override void initialization()
        {
            START_initialization();

            float x = Projectile.jp.sd.Get_Center().x, y = Projectile.jp.sd.Get_Center().y, z = Projectile.jp.sd.Get_Center().z;

            //ShaderedScene.CalculateFromMaptoGraphical(Projectile.jp.CenterCube, ref x, ref y, ref z);
            DataForDraw_ExplodingList.ForEachTemporalList(this, Projectile.jp.ProjectileParts, x, y, z, true);

            //foreach (var cube in Projectile.jp.ProjectileParts)
            //{
            //    ShaderedScene.CalculateFromMaptoGraphical(cube, ref x, ref y, ref z);
            //    Draw_Quad_Full_Sunsided_angled(x, y, z, 0, 0, 0, localed_range, cube.color, 0, true);
            //}

            END_initialization();
            base.LastCount = vertices.Count();
        }
コード例 #2
0
ファイル: Keyboard.cs プロジェクト: dd84ai/TheDiplomWork
        public static void Wrapped_SINGLE_KeyPressed_Reaction(char key)
        {
            switch (key)
            {
            case (char)27:
                StaticAccess.FMOS.table_Menu_main.Location = new System.Drawing.Point(StaticAccess.FMOS.openGLControl.Width / 2 - StaticAccess.FMOS.table_Menu_main.Size.Width / 2, StaticAccess.FMOS.openGLControl.Height / 2 - StaticAccess.FMOS.table_Menu_main.Size.Height / 2);
                StaticAccess.FMOS.table_Menu_main.Visible  = !StaticAccess.FMOS.table_Menu_main.Visible;
                if (!StaticAccess.FMOS.table_Menu_main.Visible)
                {
                    StaticAccess.FMOS.openGLControl.Focus();
                    Cursor.Hide();
                }
                else
                {
                    Cursor.Show();
                }
                break;

            //case 'g':
            //    StaticSettings.S.GhostCube_Add_in_Data_For_Draw = !StaticSettings.S.GhostCube_Add_in_Data_For_Draw;
            //    break;

            case 'f':
                StaticSettings.S.FallingCube = !StaticSettings.S.FallingCube;
                if (StaticSettings.S.FallingCube)
                {
                    Speech.ls.synthesizer.SpeakAsync("Falling Cube Mod Activated");
                }
                else
                {
                    Speech.ls.synthesizer.SpeakAsync("Falling Cube Mod Deactivated");
                }
                //StaticSettings.S.FlyMod = !StaticSettings.S.FlyMod;
                //if (StaticSettings.S.FlyMod)
                //    Speech.ls.synthesizer.SpeakAsync("Fly Mod Activated");
                //else Speech.ls.synthesizer.SpeakAsync("Fly Mod Deactivated");
                break;

            case 'p':
                StaticSettings.S.PhantomMod = !StaticSettings.S.PhantomMod;
                if (StaticSettings.S.PhantomMod)
                {
                    Speech.ls.synthesizer.SpeakAsync("Phantom Mod Activated");
                }
                else
                {
                    Speech.ls.synthesizer.SpeakAsync("Phantom Mod Deactivated");
                }

                break;

            //case 'e':
            //    StaticSettings.S.ExplosionMod = !StaticSettings.S.ExplosionMod;
            //    if (StaticSettings.S.ExplosionMod)
            //        Speech.ls.synthesizer.SpeakAsync("Explosion Mod Activated");
            //    else Speech.ls.synthesizer.SpeakAsync("Explosion Mod Deactivated");
            //    break;

            case 'l':
                Projectile.jp.Launched = !Projectile.jp.Launched;
                if (Projectile.jp.Launched)
                {
                    Projectile.jp.Launch();
                    Speech.ls.synthesizer.SpeakAsync("Launching");
                }
                else
                {
                    Projectile.jp.DeLaunch();
                    Wrapped_SINGLE_KeyPressed_Reaction((char)254);
                }
                break;

            //case 'j':
            //    Projectile.jp.RotatingStartingVelocity = !Projectile.jp.RotatingStartingVelocity;
            //    if (Projectile.jp.RotatingStartingVelocity)
            //    {
            //        Projectile.jp.SetStartingPlayerView();
            //        Speech.ls.synthesizer.SpeakAsync("On");
            //    }
            //    else
            //    {
            //        Projectile.jp.SetEndingPlayerView();
            //        Speech.ls.synthesizer.SpeakAsync("Off");
            //    }
            //    break;


            case 'k':
                Speech.ls.synthesizer.SpeakAsync("First Position fixated");
                Projectile.jp.SetHpos1();
                break;

            case 'i':
                Speech.ls.synthesizer.SpeakAsync("Second Position fixated");
                Projectile.jp.SetHpos2();
                Wrapped_SINGLE_KeyPressed_Reaction((char)254);
                break;

            case 'o':
                Projectile.jp.LoadFromFile();
                break;

            case (char)186:
                Projectile.jp.Player_rotational_view_Result_NULLIFICATE();
                break;

            case 'b':    //boom!
                if (Projectile.jp.Loaded)
                {
                    //Explosion.exp.StartingTime = (float)Time.time.GetGameTotalSeconds();
                    Explosion.exp.ExplosionCenter = Projectile.jp.CenterCube;
                    Explosion.exp.SetBombLocation(Projectile.jp.AbsoluteEstimatedLocation());
                    //Explosion.exp.PlaceTheBombAt(Explosion.exp.ExplosionCenter);

                    Explosion.exp.StartingFirst        = true;
                    Explosion.exp.StartingFirstStarted = false;
                    Explosion.exp.Exploding_Rewriter();
                    Scene.Reloader_ExplosionList();
                    StaticSettings.S.RealoderCauseOfBuildingBlocks = true;
                }
                break;

            case 'x':    //Last_Cancel
                if (Projectile.jp.Loaded)
                {
                    DataForDraw_ExplodingList.TemporalList_Clear();
                    Explosion.exp.Exploding_Last_Cancel();
                    DataForDraw_ExplodingList.TemporalList.Clear();
                    Scene.Reloader_ExplosionList();
                    StaticSettings.S.RealoderCauseOfBuildingBlocks = true;
                    Explosion.exp.StartingFirstStarted             = false;
                    Projectile.jp.Launched        = false;
                    Projectile.jp.Exploded        = false;
                    Projectile.jp.TimeOfExplosion = 99999999999;
                }
                break;

            case (char)254:    //Last_Cancel
                if (Projectile.jp.Loaded)
                {
                    //Explosion.exp.Exploding_Last_Cancel();
                    DataForDraw_ExplodingList.TemporalList_Save();
                    DataForDraw_ExplodingList.TemporalList.Clear();
                    Scene.Reloader_ExplosionList();
                    StaticSettings.S.RealoderCauseOfBuildingBlocks = true;
                    Explosion.exp.StartingFirstStarted             = false;
                    Projectile.jp.Launched        = false;
                    Projectile.jp.Exploded        = false;
                    Projectile.jp.TimeOfExplosion = 99999999999;
                }
                break;
            //case 'v'://Cancel Explosions
            //    if (StaticSettings.S.ExplosionMod)
            //    {
            //        DataForDraw_ExplodingList.TemporalList.Clear();
            //        Explosion.exp.Exploding_Restorer();
            //        Scene.Reloader_ExplosionList();
            //        StaticSettings.S.RealoderCauseOfBuildingBlocks = true;
            //    }
            //    break;

            //case 'h':
            //    StaticSettings.S.HelpInfoForPlayer = !StaticSettings.S.HelpInfoForPlayer;
            //    break;

            case 'y':
                if (StaticSettings.S.SunStatus.x > 0.5)
                {
                    Speech.ls.synthesizer.SpeakAsync("Sun Activated");
                    StaticSettings.S.SunStatus = new vec3(0, 0, 0);
                }
                else
                {
                    Speech.ls.synthesizer.SpeakAsync("Sun Deactivated");
                    StaticSettings.S.SunStatus = new vec3(1, 1, 1);
                }
                break;

            case ' ':
                if (!StaticSettings.S.FlyMod && Player.JumpCounter > Player.JumpMax - 1)
                {
                    Player.JumpState   = true;
                    Player.JumpCounter = 0;
                }
                break;

            case 't':
                Music.wav_player.SaySoundEffect("Blorp");
                Time.time.Time_Speed = 40.0; break;

            case 'u':
                Music.wav_player.SaySoundEffect("Blorp");
                Time.time.Time_Speed = 0.025; break;

            case 'q':
                SavingAlgorithm();
                Application.Exit(); break;

            case 'r':
                Speech.ls.synthesizer.Speak("Reactivating");
                SavingAlgorithm();
                Application.Restart();
                Application.Exit(); break;

            case 'c':
                Speech.ls.synthesizer.SpeakAsync("Restoring to default");
                RestoringToDefaultAlgorithm();
                break;

            case (char)187: Projectile.jp.sd.ChangeStartingVelocity(+1); break;

            case (char)189: Projectile.jp.sd.ChangeStartingVelocity(-1); break;

            case 'm': Music.wmp_player.PlayTheMusic(); break;

            case 'n': Music.wmp_player.PlayTheMusic_NextSong(); break;

            default: break;
            }
        }