コード例 #1
0
 void OnTriggerEnter(Collider col)
 {
     if (col.tag == "2")
     {
         CameraFollow cam = GameObject.FindObjectOfType <CameraFollow> ();
         cam.CameraZoomOut(35);
         Destroy(col.gameObject);
     }
     if (col.tag == "4")
     {
         CameraFollow cam = GameObject.FindObjectOfType <CameraFollow> ();
         cam.CameraZoomOut(40);
         Destroy(col.gameObject);
     }
     if (col.tag == "8")
     {
         CameraFollow cam = GameObject.FindObjectOfType <CameraFollow> ();
         cam.CameraZoomOut(45);
         Destroy(col.gameObject);
     }
     if (col.tag == "Bullet")
     {
         CmdPlayerHit(transform.name, weapon.damage);
     }
 }