Back to project page FlappyCow.
The source code is released under:
MIT License
If you think the Android project FlappyCow listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** * The pauseButton/* www . j a v a 2 s . co m*/ * * @author Lars Harmsen * Copyright (c) <2014> <Lars Harmsen - Quchen> */ package com.quchen.flappycow.sprites; import com.quchen.flappycow.Game; import com.quchen.flappycow.GameView; import com.quchen.flappycow.R; import com.quchen.flappycow.Util; public class PauseButton extends Sprite{ public PauseButton(GameView view, Game game) { super(view, game); this.bitmap = Util.getScaledBitmapAlpha8(game, R.drawable.pause_button); this.width = this.bitmap.getWidth(); this.height = this.bitmap.getHeight(); } /** * Sets the button in the right upper corner. */ @Override public void move(){ this.x = this.view.getWidth() - this.width; this.y = 0; } }