示例#1
0
        public Controller(Input input, SoundManager soundManager, ContentHolder contentHolder)
        {
            physicsEngine = new PhysicsEngine();

            this.contentHolder = contentHolder;

            this.soundManager = soundManager;
            input.jump += new Input.EventHandler(jump);
            input.duck += new Input.EventHandler(duck);

            soundManager.playSoundtrack();
        }
示例#2
0
 protected override void Initialize()
 {
     // TODO: Add your initialization logic here
     input = new Input();
     contentHolder = new ContentHolder(Content);
     soundManager = new SoundManager(contentHolder);
     gameWorld = new Gameworld(contentHolder);
     controller = new Controller(input, soundManager, contentHolder);
     this.IsMouseVisible = true;
     base.Initialize();
 }