コード例 #1
0
ファイル: Screen.cs プロジェクト: Vintharas/WP7projects
 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
ファイル: Car.cs プロジェクト: Vintharas/WP7projects
 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;
 }