예제 #1
0
 public Screen(Game game,
               SpriteBatch spriteBatch,
               ChangeScreen changeScreen)
 {
     Screen.game = game;
     Screen.content = game.Content;
     Screen.spriteBatch = spriteBatch;
     changeScreenDelegate = changeScreen;
     touchIndicator = new TouchIndicatorCollection();
     if (music == null)
         music = new Music(content);
     if (soundEffects == null)
         soundEffects = new SoundEffects(content);
 }
예제 #2
0
 public Car(Vector2 startPosition,
            ContentManager content,
            SoundEffects soundEffects,
            GameInput input,
            string moveLeftInputAction,
            string moveRightInputAction,
            int leftLanePosition,
            int rightLanePosition)
     : base(content, "Images/Car")
 {
     this.soundEffects = soundEffects;
     this.input = input;
     this.startPosition = startPosition;
     this.moveLeftAction = moveLeftInputAction;
     this.moveRightAction = moveRightInputAction;
     this.leftLanePosition = leftLanePosition;
     this.rightLanePosition = rightLanePosition;
 }