コード例 #1
0
 void FixedUpdate()
 {
     if (gameManager.IsOutside(transform.position * 0.3f))
     {
         Destroy(gameObject);
     }
 }
コード例 #2
0
 void FixedUpdate()
 {
     transform.position += Vector3.left * Time.fixedDeltaTime * speed;
     if (gameManager.IsOutside(transform.position))
     {
         Destroy(gameObject);
     }
 }
コード例 #3
0
 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);
     }
 }