public void AddMission(MissionTypes type, int target, int start) { mission = new MissionHandler(this); mission.enemiesToKill = target; mission.enemiesKilled = start; OnMissionAdd.Invoke(mission); }
public void SetMissionHandler(MissionHandler handler) { DebugLog.Finer($"MUI_Model: Setting mission handler: {handler.type} expecting {handler.enemiesToKill} kills with current kills {handler.enemiesKilled}"); _missionHandler = handler; OnMissionChangedEvent.Invoke(_missionHandler); }
public void AssignMission() { if (_missionHandlers.Count != 0) { if (_currentMission != null) { DebugLog.Warning(this, $"{_prefix} Overwriting mission!: {MH_ToString(_currentMission)}"); } _currentMission = _missionHandlers.Dequeue(); DebugLog.Fine(this, $"{_prefix} Assigned mission: {MH_ToString(_currentMission)}"); OnMissionAssignEvent.Invoke(GetCurrentMission()); } }
public void CompleteMission(bool check = true) { DebugLog.Fine(this, $"{_prefix} Completing mission: {MH_ToString(_currentMission)}"); if (_currentMission == null) { DebugLog.Severe(this, $"{_prefix} Cannot complete mission because current mission is null!!"); return; } OnMissionCompleteEvent.Invoke(_currentMission); _currentMission = null; CheckMission(check); }
public void UpdateMission(int val, bool check = true) { DebugLog.Fine(this, $"{_prefix} Updating mission: {val}, {MH_ToString(_currentMission)}"); if (_currentMission == null) { DebugLog.Severe(this, $"{_prefix} Cannot update mission because current mission is null!!"); return; } //_currentMission.enemiesKilled += val; OnMissionUpdateEvent.Invoke(_currentMission); CheckMission(check); }
public string OnStageEndInvoke(Mission m) { OnStageEnd.Invoke(OnStageEndKey, m); return(OnStageEndKey); }
public string OnMissionChosenInvoke(Mission m) { OnMissionChosen.Invoke(OnMissionChosenKey, m); return(OnMissionChosenKey); }