public override void DoInteraction() { if (_selectedVerse.Verse != null) { AudioController.GetInstance().PlayTone(); if (_poemState.Gender == PoemState.GenderEnum.Undefined) { _poemState.Gender = _selectedVerse.Gender; } Player.GetInstance().AddPoemVerse(_selectedVerse.FirstPersonVerse); _tombComponent.AddVerse(_selectedVerse.Verse); _tombComponent.PlayerTombRefocus(); Player.GetInstance().CameraController.DisableDepthOfField(0.25f); Player.GetInstance().CameraController.Unsaturate(0.0f, 1.0f); Player.GetInstance().ShowShovel(); Player.GetInstance().PlayerShovelAnimationEnding = () => Player.GetInstance().HideShovel(); if (Player.GetInstance().PlayDigAnimation()) { _animationRunning = true; _tombComponent.Bury(() => { _poemState.SetLandmarkSelectionInteraction(); _animationRunning = false; }); ++VersesChosen; if (VersesChosen >= MaxCount) { Player.GetInstance().PlayerShovelAnimationEnding = () => { ++GameState.CoffinsBuried; Player.GetInstance().CurrentState = new WalkRunState(); _tombComponent.MarkForFinished(); VersesChosen = 0; }; } } } else { if (!_animationRunning) { _poemState.SetLandmarkSelectionInteraction(); } } _displayMeshText.HideSmooth(); _selectedGameObject = null; _selectedVerse.Verse = null; }
public override void DoInteraction() { if (_hasHit) { AudioController.GetInstance().PlayTone(); _displayMeshText.HideSmooth(); TombComponent tomb = _finalTombstone.GetComponent <TombComponent>(); tomb.AddVerse(_selectedVerse.Verse); Player.GetInstance().AddPlayerTombVerse(_selectedVerse.Verse); Player.GetInstance().CameraController.DisableDepthOfField(0.25f); tomb.RaiseGravestone(1.0f, () => { if (DisplayVerses()) { Player.GetInstance().CameraController.EnableDepthOfField(0.5f); } }); } }