Esempio n. 1
0
        public virtual void Initialize(RenderContext context)
        {
            IsInitialized = true;

            //Load All Possible Pickups here
            PickupPrefabList.AddPrefab(new PickupPrefab(context, PickupName.Health, "Model/Dynamic/Player_Model"));
        }
Esempio n. 2
0
        public void Initialize(RenderContext context)
        {
            var scaleX = 1.5f;
            var scaleY = 1.2f;

            //Add Possible Grounds to the list, if all the files have the correct namegiving everything should be loaded in
            if (PiecePrefabList.Count == 0)
            {
                PiecePrefabList.AddPrefab(new PiecePrefab(context, Collision.Col1, "Piece1", scaleX, scaleY));
                PiecePrefabList.AddPrefab(new PiecePrefab(context, Collision.Col2, "Piece2", scaleX, scaleY));
                PiecePrefabList.AddPrefab(new PiecePrefab(context, Collision.Col3, "Piece4", scaleX, scaleY));
                PiecePrefabList.AddPrefab(new PiecePrefab(context, Collision.Col4, "Piece6", scaleX, scaleY));
                PiecePrefabList.AddPrefab(new PiecePrefab(context, Collision.Col5, "Piece8", -scaleX, scaleY));
            }

            //Fill Pickups
            if (PickupPrefabList.Count == 0)
            {
                //Load All Possible Pickups here, models and name
                //Models

                /*aPickupPrefabList.AddPrefab(new PickupPrefab(context, PickupName.Health, "PickupLife"));
                 * PickupPrefabList.AddPrefab(new PickupPrefab(context, PickupName.SpeedUp, "PickupSpeed"));
                 * PickupPrefabList.AddPrefab(new PickupPrefab(context, PickupName.SpeedDown, "PickupSpeed"));
                 * PickupPrefabList.AddPrefab(new PickupPrefab(context, PickupName.WindUp, "PickupSwirl"));
                 * PickupPrefabList.AddPrefab(new PickupPrefab(context, PickupName.WindDown, "PickupSwirl")); */

                //
                PickupPrefabList.AddPrefab(new PickupPrefab(context, PickupName.Health, "PickupLife"));
                PickupPrefabList.AddPrefab(new PickupPrefab(context, PickupName.SpeedUp, "PickupFast"));
                PickupPrefabList.AddPrefab(new PickupPrefab(context, PickupName.SpeedDown, "PickupFast"));
                PickupPrefabList.AddPrefab(new PickupPrefab(context, PickupName.WindUp, "PickupWhirl"));
                PickupPrefabList.AddPrefab(new PickupPrefab(context, PickupName.WindDown, "PickupWhirl"));

                PickupPrefabList.AddPrefab(new PickupPrefab(context, PickupName.WindVulcano, "WindVulcano"));
            }

            //Fill trees
            if (TreePrefabList.Count == 0)
            {
                TreePrefabList.AddPrefab(new TreePrefab(context, TreeName.Tree1, "Tree1"));
                TreePrefabList.AddPrefab(new TreePrefab(context, TreeName.Tree2, "Tree2"));
                TreePrefabList.AddPrefab(new TreePrefab(context, TreeName.Tree3, "Tree3"));
            }

            //Fill Enemies
            if (EnemyPrefabList.Count == 0)
            {
                //Load all Possible Pickups here, models and name
                EnemyPrefabList.AddPrefab(new EnemyPrefab(context, EnemyName.Wheel, "EnemyRotator"));
                EnemyPrefabList.AddPrefab(new EnemyPrefab(context, EnemyName.Smash, "SmashingWall"));
                EnemyPrefabList.AddPrefab(new EnemyPrefab(context, EnemyName.FallDown, "Enemy1"));
            }

            //always the same startpieces
            m_Level.Add(new Level_0());
            m_Level[0].Initialize(context);
            GenerateLevel(m_LevelsToGenerate, context);
        }