void FixedUpdate() { if (gameManager.IsOutside(transform.position * 0.3f)) { Destroy(gameObject); } }
void FixedUpdate() { transform.position += Vector3.left * Time.fixedDeltaTime * speed; if (gameManager.IsOutside(transform.position)) { Destroy(gameObject); } }
void FixedUpdate() { if (gameManager.IsOutside(transform.position * 0.3f)) { Destroy(gameObject); } if (invulTimeLeft > 0) { invulTimeLeft -= Time.fixedDeltaTime; int phase = ((int)((invulTimeLeft * 20) % 10)) % 2; if (phase == 0) { animator.gameObject.SetActive(false); } else { animator.gameObject.SetActive(true); } } else { animator.gameObject.SetActive(true); } }