示例#1
0
        public Actor(Game game, GameplayScreen host)
            : base(game)
        {
            //the host contains useful things such as a camera matrix
            hostScreen = host;

            // TODO: Construct any child components here
            timer          = new Utils.Timer();
            worldTransform = new Matrix();
            worldTransform = Matrix.Identity;

            // DO NOT ADJUST SCALE IN A CONSTRUCTOR
            m_scale    = 1.0f;
            m_position = new Vector3(0.0f, 0.0f, 0.0f);
            m_quat     = Quaternion.Identity;
            m_changed  = true;
            modifyWorldTransform();

            m_velocity = new Vector3(0.0f, 0.0f, 0.0f);
            //default, rotate zero speed around the Up vector
            m_rotationAxis     = Vector3.Up;
            m_rotationVelocity = 0.0f;

            fMass             = 1;
            fTerminalVelocity = 350;
            vForce            = Vector3.Zero;
            vAcceleration     = Vector3.Zero;
            bPhysicsDriven    = false;
        }
        public SpawnManager(Game game)
            : base(game)
        {
            asteroids = new List<Asteroid>();
            timer = new Utils.Timer();

            timer.AddTimer("creationTimer", .1f, createAsteroids, true);
            this.game = game;
            random = new Random();
        }
示例#3
0
        public SpawnManager(Game game)
            : base(game)
        {
            asteroids = new List <Asteroid>();
            timer     = new Utils.Timer();

            timer.AddTimer("creationTimer", .1f, createAsteroids, true);
            this.game = game;
            random    = new Random();
        }
示例#4
0
        public Missile(Game game, GameplayScreen host)
            : base(game, host)
        {
            modelName = "Missile";

            missileTimer = new Utils.Timer();
            quat = Quaternion.CreateFromRotationMatrix(Matrix.CreateRotationX((float)Math.PI / 2));

            bPhysicsDriven = true;
            fTerminalVelocity *= 1.5f;
        }
示例#5
0
        public Missile(Game game, GameplayScreen host)
            : base(game, host)
        {
            modelName = "Missile";

            missileTimer = new Utils.Timer();
            quat         = Quaternion.CreateFromRotationMatrix(Matrix.CreateRotationX((float)Math.PI / 2));

            bPhysicsDriven     = true;
            fTerminalVelocity *= 1.5f;
        }
示例#6
0
        public Actor(Game game, GameplayScreen host)
            : base(game)
        {
            //the host contains useful things such as a camera matrix
            hostScreen = host;

            // TODO: Construct any child components here
            timer = new Utils.Timer();
            worldTransform = new Matrix();
            worldTransform = Matrix.Identity;

            // DO NOT ADJUST SCALE IN A CONSTRUCTOR
            m_scale = 1.0f;
            m_position = new Vector3(0.0f, 0.0f, 0.0f);
            m_quat = Quaternion.Identity;
            m_changed = true;
            modifyWorldTransform();

            m_velocity = new Vector3(0.0f, 0.0f, 0.0f);
            //default, rotate zero speed around the Up vector
            m_rotationAxis = Vector3.Up;
            m_rotationVelocity = 0.0f;

            fMass = 1;
            fTerminalVelocity = 350;
            vForce = Vector3.Zero;
            vAcceleration = Vector3.Zero;
            bPhysicsDriven = false;
        }