예제 #1
0
    // Update is called once per frame
    void Update()
    {
        // Ready 상태일 때 Active 상태로 전환한다.
        m_state = ReadyStateTransition();

        // 딜레이 카운트
        CountDelay();

        // 바라보는 방향 선형 보간
        m_currentFocusAngle = Mathf.Lerp(m_currentFocusAngle, m_focusAngle, 0.1f);
        animator.SetFloat("Focus", m_currentFocusAngle);
    }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        if (!animator)
        {
            Debug.LogError("Yuzuki Yukari : Animator not found.");
        }
        m_controller = GetComponent <CharacterController>();
        if (!m_controller)
        {
            Debug.LogError("Yuzuki Yukari : Character Controller not found.");
        }

        m_state             = YukariState.Ready;
        m_readyTime         = 0;
        m_delayedTime       = shootDelay;
        m_focusAngle        = 0;
        m_currentFocusAngle = 0;
    }