Esempio n. 1
0
 void CreateTeams()
 {
     Player player = new Player();
     player.SetEnabled(true);
     player.SetControllable(true);
     Entities.Add("Player", player);
 }
Esempio n. 2
0
 void CreateTeams()
 {
     MainPlayer = new Player();
     MainPlayer.SetEnabled(true);
     MainPlayer.SetControllable(true);
     MainPlayer.SetSpawnPosition(FindEntity("Tent").Transformation.GetPosition());
     //MainPlayer.SetSpawnPosition(FindEntity("Tent").Transformation.GetPosition());
     Entities.Add("Player", MainPlayer);
     MainDirector = new AIDirector();
     Entities.Add("AIDirector", MainDirector);
     Entities.Add("SeaMonster", new SeaMonster());
 }
Esempio n. 3
0
        void InitializeScene()
        {
            Vector3[] directions = new Vector3[] { Vector3.Left, Vector3.Right, Vector3.Forward, Vector3.Backward, Vector3.Up };
            foreach (Vector3 dir in directions)
            {
                Entities.Add(new Opponent(dir * 0.5f));
            }
            Entities.Add(new Sky());
            MainLight = new Sunlight();
            MainTerrain = new Terrain();
            MainPlayer = new Player(Vector3.Up * 0.25f);

            Entities.Add(MainPlayer);
            Entities.Add(MainTerrain);
            Entities.Add(MainLight);
            for (int i = 0; i < 50; i++)
            {
                Tree tree = new Tree();
                tree.setNum(i % 8);
                Entities.Add(tree);
            }

            Random randomHelper = new Random();
            for (int i = 0; i < NUM_GEMS; i++)
            {
                Entities.Add(new Gem(randomHelper));
                Entities.Add(new Health(randomHelper));
            }

            Entities.Add(new Light(LightType.Directional, new Vector3(0.1797f, 0.744f, 1.12f), Vector3.Right, false));
        }