//var sd:int;
var xm:int;
function Update () {
if(gameObject.transform.position.y<0){
xm=gameObject.Find("Main Camera").GetComponent(sheji).xmshu++;
//sd=gameObject.Find("Main Camera").GetComponent(sheji).sdshu;
//gameObject.Find("wenzi").GetComponent(GUIText).text="射弹数:" +sd+" 消灭数:"+xm;
//判断消灭数是否大于20
if(xm > 20){
gameObject.Find("wenzi").GetComponent(GUIText).text = "恭喜过关!继续努力!坚持学下去!";
gameObject.Find("Main Camera").GetComponent(sheji).enabled=false;
gameObject.Find("dimian").GetComponent(restart).enabled=true;
}
Destroy(gameObject);
}
Please prove that you are the blog's owner by placing this code somewhere in a post:
TP:2FD38E9E