// Update is called once per frame
 void Update()
 {
     if (managerSciprt == null)
     {
         managerSciprt = GameObject.Find("GameManager").GetComponent <InSideJobManager>();
     }
     if (thiefCollecterScript == null)
     {
         thiefCollecterScript = GameObject.FindGameObjectWithTag("ThiefCollector").GetComponent <ThiefCollectorManager>();
     }
 }
    private void CollectorHit(GameObject thiefCollector)
    {
        ThiefCollectorManager thiefCollectorScript = thiefCollector.GetComponent <ThiefCollectorManager>();

        if (spawnSorter.map1)
        {
            thiefCollector.transform.position = spawnSorter.thiefCollectorSpawn;
        }
        if (spawnSorter.map2)
        {
            thiefCollector.transform.position = spawnSorter.thiefCollectorSpawn;
        }
        if (spawnSorter.map3)
        {
            thiefCollector.transform.position = spawnSorter.thiefCollectorSpawn;
        }
    }
Esempio n. 3
0
    private void Update()
    {
        if (photonView.isMine)
        {
            arrowAlarmImage  = GameObject.Find("AlarmArrowImage");
            thiefHackerArrow = GameObject.Find("ThiefHackerImage");
            thiefChaserArrow = GameObject.Find("ThiefCollectorImage");
        }
        FindingAlarms();

        if (thiefHackerManager == null)
        {
            thiefHacker        = GameObject.FindGameObjectWithTag("ThiefHacker");
            thiefHackerManager = GameObject.FindGameObjectWithTag("ThiefHacker").GetComponent <ThiefHackerManager>();
        }
        if (thiefCollectorManager == null)
        {
            thiefCollector        = GameObject.FindGameObjectWithTag("ThiefCollector");
            thiefCollectorManager = GameObject.FindGameObjectWithTag("ThiefCollector").GetComponent <ThiefCollectorManager>();
        }


        if (stunActivated)
        {
            StartCoroutine(Stunned());
        }


        // if (GameObject.FindGameObjectWithTag("ThiefCollector") == null)
        // {
        //     thiefCollector = GameObject.FindGameObjectWithTag("ThiefCollector");
        // }
        // if (GameObject.FindGameObjectWithTag("ThiefHacker") == null)
        // {
        //     thiefHacker = GameObject.FindGameObjectWithTag("ThiefHacker");
        // }

        FogStatus();
        timeLeft     -= Time.deltaTime;
        stunCoolDown -= Time.deltaTime;
    }