示例#1
0
        public static void UpdateGameLevel(ref Game.LevelInfo.LevelData lvl)
        {
            for (int i = 0; i < lights.Count; i++)
            {
                Materials.PPPointLight light = lights[i];

                lvl.Lights.LightsList[i].Attenuation = light.Attenuation;
                lvl.Lights.LightsList[i].Color       = light.Color.R.ToString("X") + light.Color.G.ToString("X") + light.Color.B.ToString("X");
                lvl.Lights.LightsList[i].Position    = new Game.LevelInfo.Coordinates(light.Position);
            }

            while (lvl.Lights.LightsList.Count != lights.Count)
            {
                lvl.Lights.LightsList.RemoveAt(lvl.Lights.LightsList.Count - 1);
            }
        }
示例#2
0
        public static void UpdateGameLevel(ref Game.LevelInfo.LevelData lvl)
        {
            for (int i = 0; i < modelsList.Count; i++)
            {
                CModel mdl = modelsList[i];

                lvl.MapModels.Models[i].Position   = new Game.LevelInfo.Coordinates(mdl._modelPosition);
                lvl.MapModels.Models[i].Rotation   = new Game.LevelInfo.Coordinates(mdl._modelRotation);
                lvl.MapModels.Models[i].Scale      = new Game.LevelInfo.Coordinates(mdl._modelScale);
                lvl.MapModels.Models[i].Alpha      = mdl.Alpha;
                lvl.MapModels.Models[i].Explodable = mdl._Explodable;
            }
            while (lvl.MapModels.Models.Count != modelsList.Count)
            {
                lvl.MapModels.Models.RemoveAt(lvl.MapModels.Models.Count - 1);
            }
        }
示例#3
0
        public static void UpdateGameLevel(ref Game.LevelInfo.LevelData lvl)
        {
            for (int i = 0; i < _pickups.Count; i++)
            {
                CPickUp pickup = _pickups[i];

                lvl.MapModels.Pickups[i].Position      = new Game.LevelInfo.Coordinates(pickup._Model._modelPosition);
                lvl.MapModels.Pickups[i].Rotation      = new Game.LevelInfo.Coordinates(pickup._Model._modelRotation);
                lvl.MapModels.Pickups[i].Scale         = new Game.LevelInfo.Coordinates(pickup._Model._modelScale);
                lvl.MapModels.Pickups[i].WeaponBullets = pickup._weaponBullets;
                lvl.MapModels.Pickups[i].WeaponName    = pickup._weaponName;
            }

            while (lvl.MapModels.Pickups.Count != _pickups.Count)
            {
                lvl.MapModels.Pickups.RemoveAt(lvl.MapModels.Pickups.Count - 1);
            }
        }
示例#4
0
        public static void UpdateGameLevel(ref Game.LevelInfo.LevelData lvl)
        {
            for (int i = 0; i < _tTrees.Count; i++)
            {
                Tree tree = _tTrees[i];

                lvl.MapModels.Trees[i].Position = new Game.LevelInfo.Coordinates(tree.Position);
                lvl.MapModels.Trees[i].Rotation = new Game.LevelInfo.Coordinates(tree.Rotation);
                lvl.MapModels.Trees[i].Scale    = new Game.LevelInfo.Coordinates(tree.Scale);
                lvl.MapModels.Trees[i].Seed     = tree._seed;
                lvl.MapModels.Trees[i].Wind     = tree._useWind;
                lvl.MapModels.Trees[i].Branches = tree._useBranches;
                lvl.MapModels.Trees[i].Profile  = tree._profile;
            }

            while (lvl.MapModels.Trees.Count != _tTrees.Count)
            {
                lvl.MapModels.Trees.RemoveAt(lvl.MapModels.Trees.Count - 1);
            }
        }
示例#5
0
        public static void UpdateGameLevel(ref Game.LevelInfo.LevelData lvl)
        {
            for (int i = 0; i < listWater.Count; i++)
            {
                CWater water = listWater[i];

                lvl.Water.Water[i].Alpha       = water.WaterAlpha;
                lvl.Water.Water[i].Coordinates = new Game.LevelInfo.Coordinates(water.waterPosition);
                lvl.Water.Water[i].SizeX       = water.waterSize.X;
                lvl.Water.Water[i].SizeY       = water.waterSize.Y;
            }

            if (lvl.Water != null && lvl.Water.Water != null)
            {
                while (lvl.Water.Water.Count != listWater.Count)
                {
                    lvl.Water.Water.RemoveAt(lvl.Water.Water.Count - 1);
                }
            }
        }
示例#6
0
        public static void UpdateGameLevel(ref Game.LevelInfo.LevelData lvl)
        {
            FixQueuedBots();
            for (int i = 0; i < _enemyList.Count; i++)
            {
                CEnemy enemy = _enemyList[i];

                lvl.Bots.Bots[i].IsAggressive  = enemy._isAgressive;
                lvl.Bots.Bots[i].Life          = enemy._life;
                lvl.Bots.Bots[i].Name          = enemy._hudText;
                lvl.Bots.Bots[i].RangeOfAttack = enemy._rangeAttack;
                lvl.Bots.Bots[i].SpawnPosition = new Game.LevelInfo.Coordinates(enemy._model._position);
                lvl.Bots.Bots[i].Type          = enemy._type;
                lvl.Bots.Bots[i].Velocity      = enemy._runningVelocity;
            }

            while (lvl.Bots.Bots.Count != _enemyList.Count)
            {
                lvl.Bots.Bots.RemoveAt(lvl.Bots.Bots.Count - 1);
            }
        }