コード例 #1
0
    public virtual float GetSumOfOtherObjectsMass(bool p_includeChildrens = true, bool p_multiplyByGravityScale = true)
    {
        float             v_sumOfOtherObjectsMass = 0;
        List <GameObject> v_otherObjects          = GetAllOtherAttachedObjectsInPluggedRopes();

        foreach (GameObject v_object in v_otherObjects)
        {
            v_sumOfOtherObjectsMass += KiltUtils.GetObjectMass(v_object, p_includeChildrens, p_multiplyByGravityScale);
        }
        return(v_sumOfOtherObjectsMass);
    }
コード例 #2
0
    public float GetSumOfIndirectObjectsMass(bool p_includeOtherPluggedObjects = true, bool p_includeChildrens = true, bool p_multiplyByGravityScale = true)
    {
        List <GameObject> v_indirectOtherObjectsList = GetAllIndirectObjects(p_includeOtherPluggedObjects);
        float             v_massSum = 0;

        foreach (GameObject v_object in v_indirectOtherObjectsList)
        {
            v_massSum += KiltUtils.GetObjectMass(v_object, p_includeChildrens, p_multiplyByGravityScale);
        }
        return(v_massSum);
    }
コード例 #3
0
 public float GetSelfMass(bool p_includeChildrens = true, bool p_multiplyByGravityScale = true)
 {
     return(KiltUtils.GetObjectMass(this.gameObject, p_includeChildrens, p_multiplyByGravityScale));
 }