Exemplo n.º 1
0
        /// <summary>
        /// Load graphics content for the screen.
        /// </summary>
        public override void LoadContent()
        {
            m_manager = new GameObjectManager();

            m_player = new Player(m_core.Content.Load<Model>("player/soldier2"));

            m_manager.AddEntity(m_player);

            man = new CollisionManager();
            m_player.Manager = man;

            for (int i = 0; i < 10; i++)
            {
                Enemy e = new Enemy(m_core.Content.Load<Model>("player/zombie_bones"));
                SkinningData skinningData = e.Model.Tag as SkinningData;
                if (skinningData == null)
                    throw new InvalidOperationException
                        ("This model does not contain a SkinningData tag.");
                e.Anim = new AnimationPlayer(skinningData);

                AnimationClip clip = skinningData.AnimationClips["Animace"];

                e.Anim.StartClip(clip);

                m_manager.AddEntity(e);
            }

            GameCore.Camera.Player = (Player)m_manager.GetObject("ZombieSmashGame.Entities.Player");

            spriteBatch = new SpriteBatch(m_core.GraphicsDevice);

            font = m_core.Content.Load<SpriteFont>("gamefont");
        }
Exemplo n.º 2
0
 /// <summary>
 /// Unload content for the screen.
 /// </summary>
 public override void UnloadContent()
 {
     font = null;
     m_manager.RemoveAllObjects();
     m_manager = null;
 }