示例#1
0
文件: Player.cs 项目: timfel/dash
        public Player(Game game, GameplayComponent gameplay)
            : base(game)
        {
            this.gameplay = gameplay;

            DrawOrder = 12;

            animation = defaultAnimation;
        }
示例#2
0
文件: Game1.cs 项目: timfel/dash
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            sound = new SoundManager(this);
            Components.Add(sound);

            intro = new IntroScreen(this);
            Components.Add(intro);
            intro.Enabled = true;

            gameplay = new GameplayComponent(this);
            Components.Add(gameplay);

            base.Initialize();
        }
示例#3
0
文件: Obstacles.cs 项目: timfel/dash
        public override void Initialize()
        {
            gameplay = Game.Services.GetService(typeof(GameplayComponent)) as GameplayComponent;
            sounds = Game.Services.GetService(typeof(SoundManager)) as SoundManager;

            base.Initialize();
        }