public void OnKilledEnemy(GameObject enemy) { // gain skill experience SkillExperienceReward reward = enemy.GetComponent <SkillExperienceReward>(); if (reward != null) { skillExperience += Experience.BalanceReward(reward.amount, level.current, enemy.GetComponent <Level>().current); } }