示例#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 Update()
 {
     //If the player is standing at the site of a low-tier activity, and a high-tier activity appears there, reset the Computer Display to
     //reflect this new activity, but reset the "activity selectors", so they don't suddenly accept a high-tier event at the same moment
     //that they click the "Commence" button
     //Hopefully I won't even need this, as the high-tier activity should be chosen when entering the map scene, and only "deleted" when
     //the sun comes up, at which point they return to the hideout anyway. Still, for now it can serve my testing purposes
     if (MapSceneManager.highTierActSet && MapSceneManager.currentLocation == MapSceneManager.mapLoc && compDisplay.activity.color != Color.yellow)
     {
         if (myHighTierActivity != null && myHighTierActivity != "" && myHighTierActivity != "Blank")
         {
             NightHighTierManager.isHighTierActivityHere = true;
             NightHighTierManager.SetHTCrimeRates(myHighTierActivity, isEventHappeningHere, gangName, myLandmark);
             compDisplay.UpdateCompUI();
         }
     }
 }
示例#3
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;
    }