示例#1
0
文件: CanIReach.cs 项目: Cdrix/SM
    /// <summary>
    /// Will return the closest top from 'bottom' in the current bridge
    /// </summary>
    /// <param name="bottom"></param>
    Vector3 ClosestTop(Vector3 bottom)
    {
        List <Vector3> tops = new List <Vector3>()
        {
            _endATop, _endBTop
        };

        return(UMath.ReturnClosestVector3(tops, bottom));
    }
示例#2
0
文件: CanIReach.cs 项目: Cdrix/SM
    /// <summary>
    /// Defines the Two ends of a Brdige
    /// </summary>
    void FindTopPointOnBridge()
    {
        List <StructureParent> currentBridgeParts12 = _bridge.GiveTheTwoEndsParts10and12();
        var part12ATop = currentBridgeParts12[0].BottomTop(this)[1].transform.position;
        var part12BTop = currentBridgeParts12[1].BottomTop(this)[1].transform.position;

        var posit = new List <Vector3>()
        {
            part12ATop, part12BTop
        };

        _endATop = UMath.ReturnClosestVector3(posit, _from);
        _endBTop = UMath.ReturnFarestVector3(posit, _from);
    }