public OnCollected ( |
||
collectedBy | /// The player who collected this gem. Although currently not used, this parameter would be /// useful for creating special powerup gems. For example, a gem could make the player invincible. /// | |
return | void |
/// <summary> /// Called when a gem is collected. /// </summary> /// <param name="gem">The gem that was collected.</param> /// <param name="collectedBy">The player who collected this gem.</param> private void OnGemCollected(Gem gem, Player collectedBy) { score += Gem.PointValue; gem.OnCollected(collectedBy); }
/// <summary> /// Called when a gem is collected. /// </summary> /// <param name="gem">The gem that was collected.</param> /// <param name="collectedBy">The player who collected this gem.</param> private void OnGemCollected(Gem gem, Player collectedBy) { score += Gem.PointValue; gem.OnCollected(collectedBy); }