Back to project page BarrelRace.
The source code is released under:
MIT License
If you think the Android project BarrelRace listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.app.ui.assignment.barrelrace.objects; /*from ww w. j av a 2 s.c o m*/ import com.app.ui.assignment.barrelrace.R; import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Paint.Style; /** * @author Sudharsanan Muralidharan * @description Barrel Race Game for Android * @module Horse: Horse View Object */ /*Horse View Class*/ public class Horse { Paint mPaint; /*Constructor*/ public Horse(Context context) { mPaint = new Paint(); mPaint.setStyle(Style.FILL); mPaint.setColor(context.getResources().getColor(R.color.horse_color)); } /*Draw Horse*/ public void draw(float x, float y, float horseRadius, Canvas c) { c.drawCircle(x, y, horseRadius, mPaint); } }