private void FixedUpdate() { if (attractor != null) { attractor.Attract(transform, rb); } else { Debug.LogError("Attractor was not found in object: " + gameObject.name); } }
private void Update() { if (_objRigidbody.isKinematic) { return; } if (setSolid) { ObjectResting(); } if (_attractor != null) { _attractor.Attract(_objTransform); } }
void Update() { if (gravitychoice == 1) { FakeMain.Attract(myTransform); } else if (gravitychoice == 2) { FakeMetal.Attract(myTransform); } else if (gravitychoice == 3) { FakeFuel.Attract(myTransform); } else if (gravitychoice == 4) { FakeTech.Attract(myTransform); } else if (gravitychoice == 5) { FakeFood.Attract(myTransform); } }