protected override void ClientOnStart() { this.clientFishingVisualizer = this.Character.ClientSceneObject .AddComponent <ComponentFishingVisualizer>(); this.clientFishingVisualizer.Setup(this.Character, this.FishingTargetPosition); if (this.CurrentFishingSession is not null) { this.clientFishingVisualizer.OnFishingSessionReceived(this.CurrentFishingSession); } var skeletonRenderer = PlayerCharacter.GetClientState(this.Character).SkeletonRenderer; skeletonRenderer.RemoveAnimationTrackNextEntries(AnimationTrackIndexes.Extra); skeletonRenderer.AddAnimation(AnimationTrackIndexes.Extra, FishingInAnimationName, isLooped: false); ClientFishingSoundsHelper.PlaySoundStart(this.Character); }
protected override void ClientOnCompleted() { ComponentFishingCompletedVisualizer.OnFishCaughtOrFishingCancelled( this.Character, protoItemFishCaught: null, this.FishingTargetPosition, caughtFishSizeValue: 0); if (!this.clientFishingVisualizer.IsDestroyed) { this.clientFishingVisualizer.Destroy(delay: ComponentFishingVisualizer.DelayFishingOut); } this.clientFishingVisualizer = null; var skeletonRenderer = PlayerCharacter.GetClientState(this.Character).SkeletonRenderer; skeletonRenderer.RemoveAnimationTrackNextEntries(AnimationTrackIndexes.Extra); skeletonRenderer.AddAnimation(AnimationTrackIndexes.Extra, FishingOutAnimationName, isLooped: false); ClientFishingSoundsHelper.PlaySoundCancel(this.Character); }