summaryrefslogtreecommitdiff
path: root/client/Piztor/src/com
diff options
context:
space:
mode:
authorsjtufs <[email protected]>2013-09-03 16:07:42 +0800
committersjtufs <[email protected]>2013-09-03 16:07:42 +0800
commitcea9cded1837fbe9d1fafbf5689db10b2296116e (patch)
tree68abc0f3d58a9aa739cd161947598a1042d19a35 /client/Piztor/src/com
parente52889f656592cd5afb09439c112f5ad44a110dc (diff)
game version. tested well todaygame
Diffstat (limited to 'client/Piztor/src/com')
-rw-r--r--client/Piztor/src/com/macaroon/piztor/AlertMaker.java1
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Login.java13
-rw-r--r--client/Piztor/src/com/macaroon/piztor/Main.java19
-rw-r--r--client/Piztor/src/com/macaroon/piztor/MapMaker.java4
-rw-r--r--client/Piztor/src/com/macaroon/piztor/myApp.java4
5 files changed, 23 insertions, 18 deletions
diff --git a/client/Piztor/src/com/macaroon/piztor/AlertMaker.java b/client/Piztor/src/com/macaroon/piztor/AlertMaker.java
index a8d1138..ed376c3 100644
--- a/client/Piztor/src/com/macaroon/piztor/AlertMaker.java
+++ b/client/Piztor/src/com/macaroon/piztor/AlertMaker.java
@@ -79,6 +79,7 @@ public class AlertMaker {
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
context.startActivity(intent);
+ dialog.cancel();
}
});
gpsDialog.show();
diff --git a/client/Piztor/src/com/macaroon/piztor/Login.java b/client/Piztor/src/com/macaroon/piztor/Login.java
index e86b543..6cdd966 100644
--- a/client/Piztor/src/com/macaroon/piztor/Login.java
+++ b/client/Piztor/src/com/macaroon/piztor/Login.java
@@ -16,6 +16,7 @@ import android.view.animation.Animation;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
+import android.widget.TextView;
import android.widget.Toast;
public class Login extends PiztorAct {
@@ -108,12 +109,18 @@ public class Login extends PiztorAct {
id = "login";
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
- ImageView imageView = (ImageView) findViewById(R.id.login_img);
+ TextView textView = (TextView) findViewById(R.id.login_app_name);
AlphaAnimation alphaUp = new AlphaAnimation(0.0f, 1.0f);
alphaUp.setDuration(2000);
- alphaUp.setStartOffset(500);
+ alphaUp.setStartOffset(200);
alphaUp.setFillAfter(true);
- imageView.startAnimation(alphaUp);
+ textView.startAnimation(alphaUp);
+ TextView textView1 = (TextView) findViewById(R.id.login_game_version);
+ AlphaAnimation alphaUp1 = new AlphaAnimation(0.0f, 1.0f);
+ alphaUp1.setDuration(2000);
+ alphaUp1.setStartOffset(1000);
+ alphaUp1.setFillAfter(true);
+ textView1.startAnimation(alphaUp1);
}
@Override
diff --git a/client/Piztor/src/com/macaroon/piztor/Main.java b/client/Piztor/src/com/macaroon/piztor/Main.java
index bd6d709..f62ed0c 100644
--- a/client/Piztor/src/com/macaroon/piztor/Main.java
+++ b/client/Piztor/src/com/macaroon/piztor/Main.java
@@ -156,11 +156,11 @@ public class Main extends PiztorAct {
break;
case -1:
EException e = (EException) m.obj;
- if (e.Etype == EException.EPushFailedException)
- out.receiveMessage("网络不稳定~");
- else if (e.Etype == EException.ECheckinFailedException)
+ if (e.Etype == EException.ECheckinFailedException)
out.receiveMessage("路点已过期!");
- else out.actMgr.trigger(AppMgr.logout);
+ else if (e.Etype == EException.EStatusFailedException)
+ out.appMgr.trigger(AppMgr.logout);
+ else out.receiveMessage("网络不稳定~");
default:
break;
}
@@ -205,7 +205,7 @@ public class Main extends PiztorAct {
void receiveMessage(String msg) {
Toast toast = Toast.makeText(getApplicationContext(), msg, 5000);
- toast.setGravity(Gravity.TOP, 0, 80);
+ toast.setGravity(Gravity.TOP, 0, 100);
toast.show();
}
@@ -252,19 +252,19 @@ public class Main extends PiztorAct {
int TMP = location.getLocType();
if (TMP == 61) {
Toast toast = Toast.makeText(Main.this,
- "Piztor : 由GPS更新 (刷新时间" + GPSrefreshrate + "s)", 2000);
+ "Piztor : 由GPS更新 (刷新时间" + GPSrefreshrate + "s)", 1000);
toast.setGravity(Gravity.TOP, 0, 80);
toast.show();
}
if (TMP == 161) {
Toast toast = Toast.makeText(Main.this,
- "Piztor : 由网络更新 (刷新时间" + GPSrefreshrate + "s)", 2000);
+ "Piztor : 由网络更新 (刷新时间" + GPSrefreshrate + "s)", 1000);
toast.setGravity(Gravity.TOP, 0, 80);
toast.show();
}
if (TMP == 65) {
Toast toast = Toast.makeText(Main.this,
- "Piztor : 由缓存更新 (刷新时间" + GPSrefreshrate + "s)",2000);
+ "Piztor : 由缓存更新 (刷新时间" + GPSrefreshrate + "s)",1000);
toast.setGravity(Gravity.TOP, 0, 80);
toast.show();
}
@@ -334,8 +334,6 @@ public class Main extends PiztorAct {
mid = i.markerId;
}
}
- //TODO
-
if (minDis > 15.0 || mid == -1) {
Toast toast = Toast.makeText(Main.this,
String.format("请靠近路标,现在距离%.2f米",minDis), 4000);
@@ -425,7 +423,6 @@ public class Main extends PiztorAct {
if (app.mapInfo.myInfo.level >= 2 && !app.gameStarted) {
app.gameStarted = true;
settingsText.setText("得分");
- //TODO
ReqGameStart req = new ReqGameStart(app.token, app.username, System.currentTimeMillis(), 10 * 1000);
transam.send(req);
}
diff --git a/client/Piztor/src/com/macaroon/piztor/MapMaker.java b/client/Piztor/src/com/macaroon/piztor/MapMaker.java
index 18eb524..1951ea9 100644
--- a/client/Piztor/src/com/macaroon/piztor/MapMaker.java
+++ b/client/Piztor/src/com/macaroon/piztor/MapMaker.java
@@ -137,8 +137,8 @@ public class MapMaker {
OverlayItem item = getItem(index);
UserInfo tmpInfo = app.mapInfo.getUserInfo(itemToUser
.get(item));
- String itemInfo = tmpInfo.company + "连" + tmpInfo.section
- + "班 " + tmpInfo.nickname;
+ String itemInfo = tmpInfo.section
+ + "队 " + tmpInfo.nickname;
popupText.setText(itemInfo);
Bitmap bitmap = BMapUtil.getBitmapFromView(popupInfo);
popLay.showPopup(bitmap, item.getPoint(), 32);
diff --git a/client/Piztor/src/com/macaroon/piztor/myApp.java b/client/Piztor/src/com/macaroon/piztor/myApp.java
index d8cdc9c..ba36eb0 100644
--- a/client/Piztor/src/com/macaroon/piztor/myApp.java
+++ b/client/Piztor/src/com/macaroon/piztor/myApp.java
@@ -14,8 +14,8 @@ public class myApp extends Application {
BMapManager mBMapManager;
boolean isExiting = false;
boolean isLogout = false;
- String ip = "202.120.7.4";
-// static String ip = "69.85.86.42";
+// String ip = "202.120.7.4";
+ static String ip = "69.85.86.42";
// static String ip = "192.168.1.171";
int port = 2224;
String token = null;