示例#1
0
    private void Update()
    {
        if (GameManager.Instance.m_Main.m_GamePause)
        {
            return;
        }
        if (!m_Target)
        {
            return;
        }

        if (m_Target.m_Live == CharacterBase.E_Live.LIVE)
        {
            return;
        }

        m_SpawnTimer -= Time.deltaTime * GameManager.Instance.TimeScale;

        if (m_SpawnTimer <= 0.0f)
        {
            m_Target.transform.position = m_Target.GetNavMeshController().FindNavMeshSampleLocation(transform.position, 1.0f);
            m_Target.Revive();
            m_SpawnTimer = m_SpawnDelay;
        }
    }