private void OnAddTrapEvent(AddTrapEvent atei) { //If there are three or less trps we can add a new trap if (traps.Count < 3) { //We add a new trap here } }
// Called when the class is constructed private void Init() { //Add the this to the listeners for the add trap event message AddTrapEvent.RegisterListener(OnAddTrapEvent); }