コード例 #1
0
 private void CometCollided(Collision2D collision)
 {
     AudioSource.PlayClipAtPoint(cometImpact[Random.Range(0, cometImpact.Length)], Camera.main.transform.position, soundVolume);
     Destroy(Instantiate(clashWithComet, collision.GetContact(0).point, Quaternion.identity), clashWithComet.GetComponent <ParticleSystem>().main.duration);
     GetHealed(collision);
     cameraShaker.AddShakeDuration(0.4f);
 }