Exemplo n.º 1
0
        public void Update(Player player, GameTime gameTime)
        {
            health = (int)MathHelper.Clamp(health, 0, 100);
            shield = (int)MathHelper.Clamp(shield, 0, 100);
            capacity = (int)MathHelper.Clamp(capacity, 0, 15);

            health = (int)player._health;
            shield = (int)player._shield;
            capacity = (int)player.capacity;
            playerPosition = player._pos;
            playerAcceleration = player.acceleration;
            playerForce = player._force;
        }
Exemplo n.º 2
0
        protected override void Initialize()
        {
            camera = new Camera();
            children.Add(camera);

            ground = new Ground();
            children.Add(ground);

            world = new World();
            children.Add(world);

            player = new Player();
            children.Add(player);

            station = new Station();
            children.Add(station);

            headsUpDisplay = new HUD();

            asteroids.CreateAsteroidList();
            stationMaterial.CreateMaterialList();

            base.Initialize();
        }