示例#1
0
    // Update is called once per frame
    void Update()
    {
        if (respawn == true)
        {
            Respawn();
        }

        if (Input.GetButtonDown("CallHeli") && !helicopter.getIsCalled() && foundArea)
        {
            // Order here matters, is called must be set first otherwise future Updates
            // may still retrieve false;
            helicopter.CallForRescue();
            DeployFlare();
            voice.PlayCallHeli();
            GetComponent <ZombieSpawner>().spawnInterval = 4f;
        }
    }