Пример #1
0
 //private const int animacion_morir = 4;
 void Start()
 {
     rb           = GetComponent <Rigidbody2D>();
     animator     = GetComponent <Animator>();
     sp           = GetComponent <SpriteRenderer>();
     _audioSource = GetComponent <AudioSource>();
     Debug.Log(puntajeController.Getpuntaje());
 }
 // Start is called before the first frame update
 void Start()
 {
     spriteRenderer = GetComponent <SpriteRenderer>();
     rb             = GetComponent <Rigidbody2D>();
     Destroy(this.gameObject, 5);
     puntajeController = FindObjectOfType <PuntajeController>();
     Debug.Log(puntajeController.Getpuntaje());
 }
 private void OnCollisionEnter2D(Collision2D other)
 {
     if (other.gameObject.tag == "zombie")
     {
         Destroy(this.gameObject);
     }
     puntajeController.addpunto(10);
     Debug.Log(puntajeController.Getpuntaje());
 }