void Start() { //Se despausa al reinciar el juego _GameController.juegoPausado = false; //Animacion Inicial SkeletonAnimation = this.gameObject.GetComponent("SkeletonAnimation") as SkeletonAnimation; //PerroInicial estado_perro = ESTADOPERRO.Normal; velocidadActual = velocidadNormal; }
void OnTriggerEnter2D(Collider2D choque) { if (choque.gameObject.tag == "CambioViento") { estado_perro = ESTADOPERRO.Viento; } else if (choque.gameObject.tag == "CambioNormal") { estado_perro = ESTADOPERRO.Normal; } else if (choque.gameObject.tag == "Death") { Muerte(); } }