Beispiel #1
0
 /// <summary>
 /// Add a controller to the simulation.
 /// </summary>
 /// <param name="controller">Controller which should be added.</param>
 public void AddController(Controller controller)
 {
     if (!controllers.Contains(controller))
         controllers.Add(controller);
     else
         System.Diagnostics.Debug.WriteLine("Warning: tried to add controller to physics but it's already registered");
 }
Beispiel #2
0
 /// <summary>
 /// Removes a Controller from the simulation.
 /// </summary>
 /// <param name="controller">The Controller which should be removed.</param>
 /// <returns>True if the Controller was successfully removed.</returns>
 public bool RemoveController(Controller controller)
 {
     if (!controllers.Contains(controller)) return false;
     controllers.Remove(controller);
     return true;
 }
Beispiel #3
0
 public void AddController(Controller c)
 {
     controllers.Add(c);
     PhysicsSystem.CurrentPhysicsSystem.AddController(c);
 }