// Update is called once per frame void Update() { if (damage <= 10) { damageText.text = " " + damage; } else if (damage <= 100) { damageText.text = " " + damage; } else { damageText.text = "" + damage; } if (tookdamage == false) { if (damage <= 150 && damage > 0) { speed = .65f; sp.sprite = damagedufo; noIce = true; uf.enragemode(); } if (damage > 150) { if (noIce == true) { sp.sprite = regufo; } if (noIce == false) { sp.sprite = frozenregufo; } } } if (transform.position.x <= -9.4) { uf.faillevel(); Destroy(this.gameObject); } }
// Update is called once per frame void Update() { if (damage <= 10) { damageText.text = " " + damage; } else if (damage <= 100) { damageText.text = " " + damage; } else { damageText.text = "" + damage; } if (noIce == false && tookDamage == false) { hatchCollider.enabled = false; doneCycleOne = false; if (damage > 200) { sp.sprite = frozenregufo; } if (damage <= 200 && damage > 0) { sp.sprite = damagedufo; } } else if (doneCycleOne == false) { StartCoroutine(CycleOne()); doneCycleOne = true; } if (transform.position.x <= -9.4) { uf.faillevel(); Destroy(this.gameObject); } }