private void GoSetupTowerState() { PlayGameState = PlayGameStates.SetupTower; objXmlParser.Reset(); objGetData.Tower = objXmlParser.ParseTowerXML(); GoSetupFloorState(); }
private void GoSaveState() { PlayGameState = PlayGameStates.SaveGame; using (Stream objSaveFile = File.Create(strSaveFile)) { objSerializer.Serialize(objSaveFile, objGetData); } GoPlayState(); }
private void GoSetupFloorState() { PlayGameState = PlayGameStates.SetupFloor; //loads the current floor's information objGetData.CurrentFloor = objXmlParser.ParseNextFloorXML(); GoFillMapState(); lblOutput.Text = objGetData.CurrentRoom.MovementText; GoPlayState(); }
private void GoPlayState() { PlayGameState = PlayGameStates.Interactive; }
private void GoMoveState(EDirection eDirection) { PlayGameState = PlayGameStates.Move; if (objGetData.CanMove(eDirection)) { lblMap[objGetData.CurrentLocation.x, objGetData.CurrentLocation.y].Image = null; objGetData.MoveCharacter(); lblOutput.Text = objGetData.CurrentRoom.MovementText; //prints the image on the new Room lblMap[objGetData.CurrentLocation.x, objGetData.CurrentLocation.y].Image = Resources.sonic; LevelOverTransition(); } else { PlayGameState = PlayGameStates.Interactive; } }
private void GoGameOverState() { PlayGameState = PlayGameStates.GameOver; lblOutput.Text = "Game Complete"; PlayAgainTransition(); }
private void GoExamineState() { PlayGameState = PlayGameStates.Examine; lblOutput.Text = objGetData.CurrentRoom.ExamineText; GoFillMapState(); GoPlayState(); }
private void GoActionState() { PlayGameState = PlayGameStates.Action; lblOutput.Text = objGetData.CurrentRoom.ActionText; objGetData.CurrentRoom.PerformAction(); GoFillMapState(); GoPlayState(); }