コード例 #1
0
ファイル: PowerupMain.cs プロジェクト: zzf18676456441/caRPG
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.tag == "Player" && !attached)
     {
         ApplyTo(other.gameObject.GetComponent <PowerupManager>());
     }
     if (attached)
     {
         PowerupMain otherPowerup = other.GetComponent <PowerupMain>();
         if (otherPowerup != null)
         {
             otherPowerup.ApplyTo(appliedManager);
         }
     }
 }