Example #1
0
        private void UpdateCharge(ChargedObject otherChargeObject)
        {
            var newCharge = (Charge + otherChargeObject.Charge) / 2;

            Charge = newCharge;
            otherChargeObject.Charge = newCharge;
        }
Example #2
0
 public void AddNewChargedObject(ChargedObject obj)
 {
     physicsObjects.Add(obj);
 }
Example #3
0
 private void ResetForces(ChargedObject self)
 {
     self.CoulombForce = Vector3.zero;
     self.LorentzForce = Vector3.zero;
 }
Example #4
0
 void Awake()
 {
     render        = GetComponent <Renderer>();
     chargedObject = GetComponent <ChargedObject>();
 }