예제 #1
0
        public Input(Game game)
        {
            minZ    = -1024;
            maxZ    = minX = 5f;
            maxX    = 1024;
            maxY    = 2000;
            Restart = false;
            pause   = false;

            position       = new Vector3(950, 45.199989f, -450);
            Yaw            = 1.0f;
            config.Y_START = 950;//236;
            config.X_START = -490;
            config.Z_START = 45.199989f;

            rpm = Vector <float> .Build.Dense(4, 0);

            quadcopter_position = Vector <float> .Build.Dense(3, 0);

            quadcopter_velocity = Vector <float> .Build.Dense(3, 0);

            quadcopter_angles = Vector <float> .Build.Dense(3, 0);

            quadcopter = new Physics.Quadcopter();
            quadcopter.startSimulation();

            Projectiles  = new List <Projectile>();
            firePosition = new List <ParticleSystemTimer>();

            camera = new Camera(game, Vector3.Zero, Vector3.Zero, Vector3.Up);
        }
예제 #2
0
        public bool restart()
        {
            config.setDragConst(1);
            config.SET_MASS(0.4f);
            config.set_max_tilt_angle(30.0f);
            config.SET_WIND_OFFSET(0, 0);
            pause   = false;
            Restart = false;
            quadcopter.stopSimulation();
            quadcopter_position = Vector <float> .Build.Dense(3, 0);

            quadcopter_velocity = Vector <float> .Build.Dense(3, 0);

            quadcopter_angles = Vector <float> .Build.Dense(3, 0);

            position                = new Vector3(236, 9.199989f, -105);
            Yaw                     = 1.0f;
            config.Y_START          = 950;
            config.X_START          = -490;
            config.Z_START          = 45.199989f;
            config.YAW_START        = 90;
            config.SIMULATION_SPEED = 1;
            Pitch                   = 0; Roll = 0;
            quadcopter              = new Physics.Quadcopter();
            quadcopter.startSimulation();
            config.flight_mode = stable_flight_mode.STABILIZE_HEIGHT;
            return(true);
        }