コード例 #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();
        }
    }