コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        if (target == null)
        {
            return;
        }

        BackgroundMusic.SetChasing(state == BidgeState.Chasing);

        switch (state)
        {
        case BidgeState.Chasing:
            Chase();
            break;

        case BidgeState.Wandering:
            Wander();
            break;
        }

        if (m_DeaggroTimer > 0.0f)
        {
            m_DeaggroTimer -= Time.deltaTime;
        }
    }