Beispiel #1
0
 public void SlideUp()
 {
     if (_state == PyramidMapState.Hide)
     {
         _state = PyramidMapState.SlideUp;
     }
 }
Beispiel #2
0
 public void SlideDown()
 {
     if (_state == PyramidMapState.Show)
     {
         _state = PyramidMapState.SlideDown;
     }
 }
Beispiel #3
0
        public void Update()
        {
            switch (_state)
            {
            case PyramidMapState.SlideUp:
                if (vtMap.Y > 0)
                {
                    _backgroundAlpha += 0.035f;
                    vtMap.Y          -= 20;
                }
                else
                {
                    _state             = PyramidMapState.Show;
                    scheduledChamberId = -1;
                }
                break;

            case PyramidMapState.SlideDown:
                if (vtMap.Y < 480)
                {
                    _backgroundAlpha -= 0.035f;
                    vtMap.Y          += 20;
                }
                else
                {
                    _state = PyramidMapState.Hide;
                    if (scheduledChamberId > -1)
                    {
                        _parent.EnterPyramid(PyramidId, scheduledChamberId);
                    }
                }
                break;
            }
        }