Beispiel #1
0
    private void Infected()
    {
        // 感染候補者がいない
        if (m_candidate == null)
        {
            return;
        }

        // 感染能力を持っていない
        if (this.virus.NoneAbilityActor)
        {
            return;
        }

        // 感染者のウィルスのベースを確認
        Virus orginalVirus = this.virus.GetOriginal();

        // 感染源が存在しない
        if (orginalVirus == null)
        {
            Debug.Break();
        }

        // 感染させる
        m_candidate.Infected(orginalVirus.gameObject);

        // ビルに入れるようにする
        //NavMeshAgent navAgent = m_candidate.GetComponent<NavMeshAgent>();
        //navAgent.areaMask |= 1 << NavMesh.GetAreaFromName("Building");

        // ゾンビ状態でしか入れないエリアの開放
        NavMeshAgent navAgent = m_candidate.GetComponent <NavMeshAgent>();

        navAgent.areaMask |= 1 << NavMesh.GetAreaFromName("Infected");

        m_candidate = null;
    }
Beispiel #2
0
 // publicメソッド //
 public void StartGame()
 {
     playerVirus.Infected(null);
     isStartPandemic = true;
     comboScript.Initialize();
 }