public void ActivateRamp(bool useMainRamp) { if (ActiveRamp != null) { DeactivateRamp(ActiveRamp); } if (useMainRamp) { ActiveRamp = _mainRamp; } else if (_altRamp != null) { ActiveRamp = _altRamp; } else { Debug.LogError("Could not activate alt ramp; it is not set."); return; } ActiveRamp.Active = true; //ActiveRamp.GizmosColor = _gizmosOnColor; if (RampActivated != null) { RampActivated(useMainRamp); } }
public bool BallIncoming(Pinball ball, RampEntrance myEntrance) { _myEntrance = myEntrance; if (_ball != null) { return(false); } _ball = ball; _ball.ExitingRamp += BallInsideHole; return(true); }
public void DeactivateActiveRamp() { if (ActiveRamp != null) { DeactivateRamp(ActiveRamp); ActiveRamp = null; if (RampDeactivated != null) { RampDeactivated(); } } }
private void DeactivateRamp(RampEntrance ramp) { ramp.Active = false; //ramp.GizmosColor = _gizmosOffColor; }