private void openGLControl_MouseDown(object sender, MouseEventArgs e)
        {
            try
            {
                if (StaticSettings.S.GhostCube_Add_in_Data_For_Draw)
                {
                    CubicalMemory.Cube cube = Cube_Selection.Decide_Position_To_Place_Cube(StaticSettings.S.FallingCube);


                    if (e.Button.ToString() == "Right")
                    {
                        if (GraphicalOverlap.GO_interface_item_choice == 0 && Projectile.jp.Loaded && !Projectile.jp.Launched)
                        {
                            Projectile.jp.SetStartingPlayerView();
                            //Projectile.jp.SetEndingPlayerView();
                        }
                        Music.wav_player.SaySoundEffect("BlockPlacement");

                        Explosion.exp.PlaceTheBombAt(cube);

                        //if (!StaticSettings.S.ExplosionMod)
                        //{
                        cube.IsFilled            = true;
                        cube.IsTakenForExplosion = false;
                        cube.color = GraphicalOverlap.GO_color;
                        //}
                        //else
                        //{
                        //Explosion.exp.StartingTime = (float)Time.time.GetGameTotalSeconds();
                        //Explosion.exp.ExplosionCenter = cube;
                        //}

                        cube.FallingFromHeight   = Scene.SS.env.player.coords.Player_cubical_lookforcube.y;
                        cube.FallingStartingTime = (float)Time.time.GetGameTotalSeconds();

                        DataForDraw_FreshlyPlacedCubes.TemporalList.Add(cube);
                        scene.Reloader_TemporalList();

                        float TookTime = (float)Math.Sqrt((Scene.SS.env.player.coords.Player_cubical_lookforcube.y - cube.xyz.y) * 2 / 9.8);

                        if (Time.time.GetGameTotalSeconds() + TookTime > Time.time.TimeWaitForFallingCubes)
                        {
                            Time.time.TimeWaitForFallingCubes = Time.time.GetGameTotalSeconds() + TookTime;
                        }
                    }
                    else if (e.Button.ToString() == "Left")
                    {
                        Music.wav_player.SaySoundEffect("BlockRemovement");
                        cube.IsFilled = false;
                        cube.color    = cube.color_default;

                        StaticSettings.S.RealoderCauseOfBuildingBlocks = true;
                    }
                }
            }
            catch (Exception Ouch)
            {
                Console.WriteLine(Ouch.Message);
            }
        }
Exemplo n.º 2
0
            public void SetHpos2()
            {
                if (hpos1 == null)
                {
                    MessageBox.Show("Select Hpos1(K) before Hpos2(U)!");
                    return;
                }

                hpos2 = Cube_Selection.Decide_Position_To_Place_Cube(false);

                ShaderedScene.CalculateFromMaptoGraphical(hpos1, ref hposition1);
                ShaderedScene.CalculateFromMaptoGraphical(hpos2, ref hposition2);

                sd.Set_Center((hposition1 + hposition2) / 2);

                GatherCubes();
            }
Exemplo n.º 3
0
 public void SetHpos1()
 {
     hpos1 = Cube_Selection.Decide_Position_To_Place_Cube(false);
 }