コード例 #1
0
 private void FixedUpdate()
 {
     if (attractor != null)
     {
         attractor.Attract(transform, rb);
     }
     else
     {
         Debug.LogError("Attractor was not found in object: " + gameObject.name);
     }
 }
コード例 #2
0
    private void Update()
    {
        if (_objRigidbody.isKinematic)
        {
            return;
        }

        if (setSolid)
        {
            ObjectResting();
        }
        if (_attractor != null)
        {
            _attractor.Attract(_objTransform);
        }
    }
コード例 #3
0
ファイル: FakeGravityBody.cs プロジェクト: wall-daniel/Planan
 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);
     }
 }