Exemplo n.º 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 += RopeInternalUtils.GetObjectMass(v_object, p_includeChildrens, p_multiplyByGravityScale);
            }
            return(v_sumOfOtherObjectsMass);
        }
Exemplo n.º 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 += RopeInternalUtils.GetObjectMass(v_object, p_includeChildrens, p_multiplyByGravityScale);
            }
            return(v_massSum);
        }
Exemplo n.º 3
0
 public float GetSelfMass(bool p_includeChildrens = true, bool p_multiplyByGravityScale = true)
 {
     return(RopeInternalUtils.GetObjectMass(this.gameObject, p_includeChildrens, p_multiplyByGravityScale));
 }