Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

ZAZAZAZAZA

Member
  • Content count

    52
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ZAZAZAZAZA

  • Rank
    Member
  • Birthday 02/03/1998

Profile Information

  • Gender
    Not Telling
  • Location:
    Украина
  1. Errore

    #pragma strict import UnityEngine.UI; class MissionManager extends MonoBehaviour{ var end : End; var missionActive : boolean = false; var infoText : Text; var enemyPrefab : GameObject; var enemiesToInstantiate : int = 2; var spawnPoint : Transform; function OnTriggerEnter () { if(!missionActive){ missionActive = true; infoText.text = "Убей" + enemiesToInstantiate + "охранников"; for(var i : int = 0; i < enemiesToInstantiate; i++){ var enemy : GameObject = Instantiate(enemyPrefab, spawnPoint.position, spawnPoint.rotation); enemy.GetComponent(HealthScriptMis).manager = this; } } } function CountKills(){ enemiesToInstantiate --; if(enemiesToInstantiate <= 0){ infoText.text = "Миссия выполнена"; End(); } } } --------------------------------Первый-------------------------------- #pragma strict var infoText : Text; function Start(){ yield WaitForSeconds (1); infoText.text = ""; Destroy(gameObject); } --------------------------Второй------------------------ Так?
×