Changeset c27abf4 in galcon-client for src/com/example
- Timestamp:
- May 30, 2010, 9:42:17 PM (15 years ago)
- Branches:
- master
- Children:
- 9ef6f68
- Parents:
- 5053d90
- Location:
- src/com/example/helloandroid
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/com/example/helloandroid/Game.java
r5053d90 rc27abf4 6 6 import android.view.Menu; 7 7 import android.view.MenuItem; 8 import android.view.MotionEvent;9 8 import android.view.Window; 10 9 import android.widget.TextView; -
src/com/example/helloandroid/GameView.java
r5053d90 rc27abf4 684 684 mY = yLowerBound; 685 685 686 int result = STATE_LOSE;687 CharSequence message = "";688 Resources res = mContext.getResources();689 686 double speed = Math.sqrt(mDX * mDX + mDY * mDY); 690 687 boolean onGoal = (mGoalX <= mX - mLanderWidth / 2 && mX … … 695 692 if (onGoal && Math.abs(mHeading - 180) < mGoalAngle 696 693 && speed > PHYS_SPEED_HYPERSPACE) { 697 result = STATE_WIN;698 694 mWinsInARow++; 699 695 doStart(); … … 702 698 // Oddball case: this case does a return, all other cases 703 699 // fall through to setMode() below. 704 } else if (!onGoal) { 705 message = res.getText(R.string.message_off_pad); 706 } else if (!(mHeading <= mGoalAngle || mHeading >= 360 - mGoalAngle)) { 707 message = res.getText(R.string.message_bad_angle); 708 } else if (speed > mGoalSpeed) { 709 message = res.getText(R.string.message_too_fast); 710 } else { 711 result = STATE_WIN; 712 mWinsInARow++; 713 } 714 715 //setState(result, message); 700 } 716 701 } 717 702 } -
src/com/example/helloandroid/Planet.java
r5053d90 rc27abf4 39 39 40 40 p.setColor(Color.argb(255, 255, 255, 255)); 41 c.drawCircle(size, size, getRadius()+ 11, p);41 c.drawCircle(size, size, getRadius()+9, p); 42 42 43 43 p.setColor(Color.argb(255, 100, 100, 100)); … … 92 92 93 93 int c, prevC = linePaint.getColor(); 94 95 if(selected) {96 //drawSelectionCircle(canvas);97 }98 94 99 95 switch(faction) {
Note:
See TracChangeset
for help on using the changeset viewer.