コード例 #1
0
ファイル: Acorn.cs プロジェクト: OnCodeDeny/Emma-Unity
 private void OnMouseUpAsButton()
 {
     //If player is in range, acorn is able to be collected.
     if (playerDetector.isObjectInRange)
     {
         im.AddAcorn(amount);
         Destroy(gameObject);
     }
 }
コード例 #2
0
 // When the acorn is clicked, it gets added to the amount and is destroyed
 private void OnMouseUpAsButton()
 {
     im.AddAcorn(amount);
     Destroy(gameObject);
 }