示例#1
0
    private IEnumerator FireRoutine()
    {
        m_Animator.SetTrigger("fire");
        yield return(new WaitForSeconds(1));

        int     direction   = m_Target.position.x - transform.position.x < 0 ? -1 : 1;
        Vector3 orientation = direction < 0 ? Vector3.left : Vector3.right;

        for (int i = 0; i < 20; i++)
        {
            m_WeaponManager.AddFireCommand("DemonFire", 1, 1, orientation);
            orientation = Quaternion.AngleAxis(5 * direction, new Vector3(0, 0, -1)) * orientation;
        }
    }