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.
/** * A spider with web/*from www. jav a2 s .com*/ * * BTW Spiders have 8 eyes. * * @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; import android.graphics.Bitmap; public class Spider extends Sprite { /** * Static bitmap to reduce memory usage. */ public static Bitmap globalBitmap; public Spider(GameView view, Game game) { super(view, game); if(globalBitmap == null){ globalBitmap = Util.getScaledBitmapAlpha8(game, R.drawable.spider_full); } this.bitmap = globalBitmap; this.width = this.bitmap.getWidth(); this.height = this.bitmap.getHeight(); } /** * Sets the position * @param x * @param y */ public void init(int x, int y){ this.x = x; this.y = y; } }