コード例 #1
0
ファイル: TestRefract.cs プロジェクト: Biakuyass/GameJam2018
 private void OnCollisionEnter(Collision collision)
 {
     if (collision.gameObject.tag == "lightmode")
     {
         LightElf le = collision.gameObject.GetComponent <LightElf>();
         le.Refract(-transform.up, 0.3f);
     }
 }
コード例 #2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.tag == "lightmode")
     {
         LightElf le = other.gameObject.GetComponent <LightElf>();
         le.ConverttoOriginalState();
     }
 }
コード例 #3
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.tag == "lightmode")
     {
         LightElf le = other.gameObject.GetComponent <LightElf>();
         le.Refract(-transform.up, eta);
     }
 }