예제 #1
0
    public void OnSolverAttraction(ForceSolver solver)
    {
        if (_currentlyActiveSolver == solver)
        {
            return;
        }

        if (_currentlyActiveSolver != null)
        {
            _currentlyActiveSolver.ResetToRoot();
        }

        _currentlyActiveSolver = solver;
        foreach (var planetForceSolver in _planetForceSolvers)
        {
            if (solver == planetForceSolver)
            {
                continue;
            }
            planetForceSolver.ResetToRoot();
            planetForceSolver.EnableForce = false;
        }
    }
예제 #2
0
 public override void OnPointerDown(MixedRealityPointerEventData eventData)
 {
     base.OnPointerDown(eventData);
     PlanetForceSolver.ResetToRoot();
 }