//called when the mission is completed public void Complete() { AudioManager.Play(gameMgr.GetGeneralAudioSource(), completeAudio, false); //play the complete mission audio gameMgr.ResourceMgr.UpdateRequiredResources(completeResources, true, GameManager.PlayerFactionID); //give the player's faction the complete resources CurrAmount = targetAmount; //make sure the current amount doesn't exceed the max amount gameMgr.MissionMgr.EnableNext(); //ask the manager to enable the next mission CustomEvents.OnMissionComplete(this); //trigger custom event completeEvent.Invoke(); }