public void SlideUp() { if (_state == PyramidMapState.Hide) { _state = PyramidMapState.SlideUp; } }
public void SlideDown() { if (_state == PyramidMapState.Show) { _state = PyramidMapState.SlideDown; } }
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; } }