예제 #1
0
    //private float GetAngleToFixedEnemy()
    //{
    //    if (fixedEnemy == null)
    //        return 0f;
    //    Vector3 direct1 = transform.parent.up;
    //    Vector3 direct2 = fixedEnemy.position - transform.position;
    //    return SM.GetAngleFromTo(direct1, direct2);
    //}

    private float GetAngleToEnemy(Transform enemy)
    {
        if (enemy == null)
        {
            return(0f);
        }
        Vector3 direct1 = transform.parent.up;
        Vector3 direct2 = enemy.position - transform.position;

        return(SM.GetAngleFromTo(direct1, direct2));
    }