コード例 #1
0
ファイル: PickUp.cs プロジェクト: RogelioSales/Midterm
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.GetComponent <CharacterMovement>() == null)
     {
         return;
     }
     KeysScript.AddPoints(pointsToAdd);
     coinSoundEffect.Play();
     Destroy(gameObject);
 }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     PlayerKeysScript = player.GetComponent <KeysScript>();
 }