Esempio n. 1
0
        Vector3 GetAroundPos(Vector3 targetPos)
        {
            if (field == MovementField.Sky)
            {
                return(PEUtil.GetRandomFollowPosInSky(targetPos, transform.position - targetPos, m_Data.minR, m_Data.maxR, m_Data.minH, m_Data.maxH, -60.0f, 60.0f));
            }

            return(position + m_LocalPos);
        }
Esempio n. 2
0
 Vector3 GetAroundPos()
 {
     if (field == MovementField.Sky)
     {
         return(PEUtil.GetRandomFollowPosInSky(m_Data.followEntity.position, transform.position - m_Data.followEntity.position, m_Data.minRange, m_Data.maxRange, m_Data.minHeight, m_Data.maxHeight, -90.0f, 90.0f));
     }
     else if (field == MovementField.water)
     {
         return(PEUtil.GetRandomPositionInWater(m_Data.followEntity.position, transform.position - m_Data.followEntity.position, m_Data.minRange, m_Data.maxRange, m_Data.minHeight, m_Data.maxHeight, -90.0f, 90.0f));
     }
     else
     {
         return(PEUtil.GetRandomPositionOnGround(m_Data.followEntity.position, transform.position - m_Data.followEntity.position, m_Data.minRange, m_Data.maxRange, -90.0f, 90.0f));
     }
 }