мне нужно сделать чтоб при уничтожении выводилась надпись сколько ты убил типо счетчика
вот скрипт мож чем поможет
Код
#pragma strict
var Score : float = 0;
function Start () {
}
function Update () {
}
function OnTriggerStay(other : Collider){
if(other.tag == "Player")
Score --;
if(Score == -100)
Destroy(GameObject.FindGameObjectWithTag("Player"));
if(Score == -100)
Score=0;
if(other.tag == "Enemy")
Score ++;
if(Score == 100)
Destroy(GameObject.FindGameObjectWithTag("Enemy"));
}
function OnGUI(){
if(Score == 100)
GUI.Label(new Rect(10, 30, 100, 100), "You Kill 1 ");
if(Score == -100)
GUI.Label(new Rect(10, 30, 100, 100), "You Kill 2 ");
}
не судите строго так как это первый мой скрипт