Exemple #1
0
    public void GenerateMission(int lastLocation)
    {
        if (UIManager.Instance)
        {
            int rand = Random.Range(0, m_Locations.Count);
            if (rand == lastLocation)
            {
                rand = (rand + 1) % m_Locations.Count;
            }

            TargetLocation = m_Locations[rand];
            TargetLocation.SetTarget(true);
            TargetLocation.Loop.Play();

            MissionTimer = m_MissionDuration;
            UIManager.Instance.ShowLocationMarker(TargetLocation);

            UIManager.Instance.UpdateMissionCounter(MissionCounter);
            if (MissionCounter > 0)
            {
                UIManager.Instance.Messages.ShowRandomMessage();
                GameManager.Instance.Player.SMS();
            }

            OnMissionStarted.Invoke(TargetLocation);
        }
    }
Exemple #2
0
    public void CompleteActiveMission()
    {
        ++MissionCounter;

        UIManager.Instance.ShowLocationMarker(null);
        TargetLocation.SetTarget(false);

        OnMissionCompleted.Invoke();
        GameManager.Instance.StartConcert(TargetLocation);
        TargetLocation = null;
    }