public static RopePhysics Instance() { if (_instance == null) { _instance = new RopePhysics(); } return(_instance); }
void OnEnable() { _ropePhysics = RopePhysics.Instance(); _ropePhysics.Add(this); _prevPosition = transform.position; _axis = _ropePhysics.axis; _accel = Vector3.zero; }
void OnEnable() { _physics = RopePhysics.Instance(); _physics.constraintIterations = constraintIterations; _physics.constraintSqrError = constraintSqrError; _physics.damping = damping; _physics.axis = axis; _physics.useGravity = useGravity; _timeResidue = 0f; if (Application.isPlaying) { executeInEditor = false; } }
public static RopePhysics Instance() { if (_instance == null) _instance = new RopePhysics(); return _instance; }
void OnEnable() { _physics = RopePhysics.Instance(); _physics.constraintIterations = constraintIterations; _physics.constraintSqrError = constraintSqrError; _physics.damping = damping; _physics.axis = axis; _physics.useGravity = useGravity; _timeResidue = 0f; if (Application.isPlaying) executeInEditor = false; }