Exemplo n.º 1
0
    public void MissionComplete()
    {
        m_bMissionCompleted = true;
        m_MobManager.DestoryAllMobs();

        m_RewardManager.SetMissionResult(m_bMissionCompleted);
        m_RewardManager.SetGameDurationTime(GameTime);

        for (int i = 0; i < m_PlayerManager.Players.Count; i++)
        {
            Player player = m_PlayerManager.Players[i];
            m_RewardManager.SetReward(player.SerialNumber, player.Record);
            player.Victory();
        }

        foreach (var missionList in m_MissionManager.Missions)
        {
            foreach (var mission in missionList.Value)
            {
                if (mission.IsFinished)
                {
                    m_RewardManager.SetMissionReward(mission.Type, mission.Reward);
                }
            }
        }

        StartCoroutine(MissionCompleteProgress());
    }