Oneplayer:
- קוד: בחר הכל
package com.HungryMonster;
public class Oneplayer extends Activity
{
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
MyCount counter = new MyCount(5000,1000);
counter.start();
}
}
MyCount:
- קוד: בחר הכל
package com.HungryMonster;
import android.content.Intent;
import android.os.CountDownTimer;
public class MyCount extends CountDownTimer
{
public MyCount(long millisInFuture, long countDownInterval)
{
super(millisInFuture, countDownInterval);
// TODO Auto-generated constructor stub
}
@Override
public void onFinish()
{
Main m1=new Main();
Intent i=new Intent(null, Main.class);
m1.startActivity(i);
}
@Override
public void onTick(long millisUntilFinished) {
// TODO Auto-generated method stub
}
}

