Android Open Source - BarrelRace Horse






From Project

Back to project page BarrelRace.

License

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.

Java Source Code

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);
    }
}




Java Source Code List

com.app.ui.assignment.barrelrace.FailureActivity.java
com.app.ui.assignment.barrelrace.GameActivity.java
com.app.ui.assignment.barrelrace.MainActivity.java
com.app.ui.assignment.barrelrace.SettingsActivity.java
com.app.ui.assignment.barrelrace.SuccessActivity.java
com.app.ui.assignment.barrelrace.ViewScoresActivity.java
com.app.ui.assignment.barrelrace.objects.Barrel.java
com.app.ui.assignment.barrelrace.objects.Fence.java
com.app.ui.assignment.barrelrace.objects.Horse.java
com.app.ui.assignment.barrelrace.objects.Score.java
com.app.ui.assignment.barrelrace.util.CustomAdapter.java
com.app.ui.assignment.barrelrace.util.FileUtil.java
com.app.ui.assignment.barrelrace.util.ScoreComparator.java
com.app.ui.assignment.barrelrace.util.TimerUtil.java
com.app.ui.assignment.barrelrace.views.BarrelRaceView.java