예제 #1
0
    /// <summary>
    /// 実行処理
    /// </summary>
    public override void Execute()
    {
        Vector3 dir = m_seeControl.GetPlayer().transform.position - obj.transform.position;

        dir.Normalize();

        SimpleMove.SimpleMoving(obj.gameObject, m_rb, dir * obj.CHASE_SPEED);

        if (!m_seeControl.IsLook())
        {
            //状態切替
            obj.ChangeState(GUARD_STATE.ROAM);
        }
    }
    /// <summary>
    /// 実行処理
    /// </summary>
    public override void Execute()
    {
        m_timer += Time.deltaTime;
        if (m_timer >= 3.0)
        {
            m_timer = 0.0f;
            SimpleMove.RoamMoving(obj.gameObject, m_rb, obj.MAX_SPEED);
        }


        if (m_seeControl.IsLook())
        {
            Debug.Log("CHANGE");

            //状態切替
            obj.ChangeState(GUARD_STATE.CHASE);
        }
    }