Пример #1
0
    void OnTriggerEnter(Collider enterCol)
    {
        if (enterCol.gameObject.CompareTag("Player") && gameObject == MapSceneManager.currentLocation)
        {
            DetermineIfEventHappeningHere();

            if (isEventHappeningHere)
            {
                NightHighTierManager.isHighTierActivityHere = true;
                NightHighTierManager.SetHTCrimeRates(ClueMaster.attackType, isEventHappeningHere, ClueMaster.gangInvolvedInEvent, myLandmark);
            }
            else if (gameObject == MapSceneManager.mapLoc && myHighTierActivity != null && myHighTierActivity != "" && myHighTierActivity != "Blank")
            {
                //The Nightly Activity from the NightHighTierManager script becomes equal to "myHighTierActivity"
                NightHighTierManager.isHighTierActivityHere = true;
                NightHighTierManager.SetHTCrimeRates(myHighTierActivity, isEventHappeningHere, gangName, myLandmark);
                //Debug.Log("Location is host to a high-tier activity");
            }
            else
            {
                //Debug.Log("Location is host to a minor activity");
                NightHighTierManager.isHighTierActivityHere = false;
                NightHighTierManager.isEvent = false;
                //GetComponent<MeshRenderer>().material.color = Color.black;
                NightManager.SetCrimeRates(gangName);
            }
            compDisplay.OpenCompDisplay();
        }
    }
Пример #2
0
    void DaylightCame()
    {
        DNCycle.daylightEvent -= DaylightCame;

        highTierActSet = false;
        NightHighTierManager.ResetValues();

        if (currentLocation != null)
        {
            NightManager.SetCrimeRates(currentLocation.GetComponent <NodeDetails>().gangName);
        }

        foreach (GameObject node in mapNodes)
        {
            //NodeDetails.myHighTierActivity = "";
            node.GetComponent <MeshRenderer>().material.color = node.GetComponent <NodeDetails>().gangColor;
        }

        policeAlertBG.color  = bgOffColor;
        policeAlertText.text = "";
        StartCoroutine("OpenDaylightReturnUI");
        nightOver = true;
    }