Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 public bool BallIncoming(Pinball ball, RampEntrance myEntrance)
 {
     _myEntrance = myEntrance;
     if (_ball != null)
     {
         return(false);
     }
     _ball              = ball;
     _ball.ExitingRamp += BallInsideHole;
     return(true);
 }
Esempio n. 3
0
        public void DeactivateActiveRamp()
        {
            if (ActiveRamp != null)
            {
                DeactivateRamp(ActiveRamp);
                ActiveRamp = null;

                if (RampDeactivated != null)
                {
                    RampDeactivated();
                }
            }
        }
Esempio n. 4
0
 private void DeactivateRamp(RampEntrance ramp)
 {
     ramp.Active = false;
     //ramp.GizmosColor = _gizmosOffColor;
 }