Exemplo n.º 1
0
        public Game1()
        {
            player = new MonoGameSwordsPerson(this);
            this.Components.Add(player);

            songManager = new SongManager(this);
            this.Components.Add(songManager);

            skeleManager = new SkeletonManager(this, player);
            this.Components.Add(skeleManager);

            input = new PlayerController(this);
            this.Components.Add(input);

            score = new ScoreManager(this);
            this.Components.Add(score);

            IsFixedTimeStep        = true;
            this.TargetElapsedTime = TimeSpan.FromSeconds(1d / framesPerSecond);

            this.Window.Title = TargetElapsedTime.ToString();

            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferHeight = 800;
            graphics.PreferredBackBufferWidth  = 800;
            Content.RootDirectory = "Content";
        }
Exemplo n.º 2
0
        public int difficulty            = 2;    // The higher, the easier

        public SkeletonManager(Game game, MonoGameSwordsPerson player) : base(game)
        {
            this.player = player;
            skeletons   = new List <MonogameSkeleton>();
            songManager = new SongManager(game);
        }