AI 144542: am: CL 144539 am: CL 144533 Reformat JetBoy samples to match code style.
Original author: xav Merged from: //branches/cupcake/... Original author: android-build Automated import of CL 144542
This commit is contained in:
committed by
The Android Open Source Project
parent
cfe4476f03
commit
dfd26a838a
@@ -34,4 +34,5 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
<uses-sdk android:minSdkVersion="3"></uses-sdk>
|
||||
</manifest>
|
||||
11
samples/JetBoy/default.properties
Normal file
11
samples/JetBoy/default.properties
Normal file
@@ -0,0 +1,11 @@
|
||||
# This file is automatically generated by Android Tools.
|
||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system use,
|
||||
# "build.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
|
||||
# Project target.
|
||||
target=android-3
|
||||
@@ -15,17 +15,14 @@
|
||||
*/
|
||||
|
||||
// FIXME: review and cleanup
|
||||
|
||||
package com.example.android.jetboy;
|
||||
|
||||
public class Asteroid {
|
||||
|
||||
public int mAniIndex = 0;
|
||||
public int mDrawY = 0;
|
||||
public int mDrawX = 0;
|
||||
|
||||
public boolean mExploding = false;
|
||||
public boolean mMissed = false;
|
||||
|
||||
public long mStartTime = 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -15,12 +15,11 @@
|
||||
*/
|
||||
|
||||
// FIXME: review and cleanup
|
||||
|
||||
package com.example.android.jetboy;
|
||||
|
||||
public class Explosion {
|
||||
|
||||
public int mAniIndex = 0;
|
||||
public int mDrawY = 0;
|
||||
public int mDrawX = 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -19,16 +19,13 @@
|
||||
package com.example.android.jetboy;
|
||||
|
||||
import com.example.android.jetboy.JetBoyView.JetBoyThread;
|
||||
import com.example.android.jetboy.JetBoyView;
|
||||
import com.example.android.jetboy.R;
|
||||
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Window;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -54,6 +51,7 @@ public class JetBoy extends Activity implements View.OnClickListener{
|
||||
|
||||
/**
|
||||
* Required method from parent class
|
||||
*
|
||||
* @param savedInstanceState - The previous instance of this app
|
||||
*/
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
@@ -85,7 +83,6 @@ public class JetBoy extends Activity implements View.OnClickListener{
|
||||
mJetBoyView.SetButtonView(mButtonRetry);
|
||||
|
||||
mJetBoyView.SetTextView(mTextView);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,25 +124,22 @@ public class JetBoy extends Activity implements View.OnClickListener{
|
||||
|
||||
mJetBoyThread.setGameState(JetBoyThread.STATE_PLAY);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
Log.d("JB VIEW", "unknown click " + v.getId());
|
||||
|
||||
Log.d("JB VIEW", "state is " + mJetBoyThread.mState);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Standard override to get key-press events.
|
||||
*/
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent msg) {
|
||||
|
||||
if (keyCode == 4) super.onKeyDown(keyCode,msg);
|
||||
if (keyCode == 4)
|
||||
super.onKeyDown(keyCode, msg);
|
||||
|
||||
return mJetBoyThread.doKeyDown(keyCode, msg);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user