Exemplo n.º 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");
 }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
 public void AddController(Controller c)
 {
     controllers.Add(c);
     PhysicsSystem.CurrentPhysicsSystem.AddController(c);
 }