コード例 #1
0
        public WorldComponent(DemoGame game)
            : base(game)
        {
            _game = game;

            _game.World = new World
            {
                Boxes = new List<Box>(),
            };

            _game.World.Units = new List<Unit>
            {
                new Player(_game)
                {
                    Position = new Vector3(50f,10f,50f)
                },
                new Warrior(_game)
                {
                    Position = new Vector3(60f,0f,60f)
                },
                new Warrior(_game)
                {
                    Position = new Vector3(70f,0f,70f)
                },
                new Warrior(_game)
                {
                    Position = new Vector3(80f,0f,80f)
                }
            };

            _game.World.Terrain = new Terrain(_game, 100, 100)
            {
                LandTexture = _game.Content.Load<Texture2D>("land")
            };
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: DagonGD/DagonGraphicEngine
 static void Main()
 {
     using (var game = new DemoGame())
         game.Run();
 }