예제 #1
0
 // for solid objects the fish hits, eg. a car
 void OnCollisionEnter(Collision collision)
 {
     if (!fishOxygen.fishInWater())
     {
         GetComponent <FishSound>().playFishSound();
     }
     if (collision.gameObject.tag == "Obstacle")
     {
         fishMovement.isGrounded = false;
         StartCoroutine(Respawn(false));
     }
 }
예제 #2
0
 bool isFishSafe()
 {
     return(fishOxygen.fishInWater());
 }