using UnityEngine; namespace Auralis { public sealed class OrvoWindGift:MonoBehaviour { public static OrvoWindGift I;public const string PracticeKey="orvo-wind-reading-practiced"; public Vector2 Gift=>roof.Landing+Vector2.up*1.1f; public Vector2 Column=>roof.At(1040,624); public bool Available=>roof.Boss.ReleaseFinished; public bool Practiced=>GameSession.I.Save.Data.mechanisms.Contains(PracticeKey); OrvoRoof roof;SpriteRenderer gift,halo;SpriteRenderer[] feathers=new SpriteRenderer[24];float age; public static void Create(OrvoRoof r,Transform parent){var o=new GameObject("Orvos Windkompass · Fund und sichere Aufwindprobe");o.transform.SetParent(parent);I=o.AddComponent();I.roof=r;I.Build();} void Build() { gift=ArtLibrary.Sprite("Eigener Windkompass über dem Mastpodest",ArtLibrary.Get("WindReading"),Gift,18,transform);ArtLibrary.Height(gift,1.3f); halo=ArtLibrary.Sprite("Sanftes Licht des verdienten Windlesens",ArtLibrary.Soft,Gift,17,transform,false);halo.transform.localScale=Vector3.one*2.6f;halo.color=new Color(1,.8f,.43f,.27f); for(int i=0;i1.35f||p.y<-.1f||p.y>5.6f)return 0; return Mathf.Lerp(3.6f,.6f,Mathf.Clamp01((p.y-4.6f))); } public bool Claim() { var g=GameSession.I;if(!g.Playing||!OrvoRoof.Inside||!Available||g.Save.Data.windReading||!ContactPickup.Touching(gift))return false; g.Save.Data.windReading=true;g.Save.Data.healthCapacity=Mathf.Max(g.Save.Data.healthCapacity,8);g.Save.Write();g.Player.Restore();WorldEffects.I.Burst(Gift,ArtLibrary.Gold,28,2);HapticsDirector.Impact(Gift,.38f,.55f); RewardCeremony.Show("Das Windlesen","Orvo schenkt dir seinen Windkompass. In hellen Luftspiralen trägt dich der Aufwind: Spring hinein und halte "+g.Input.Hint("Jump")+". Probiere es rechts am Mast. Dein Bogen besitzt nun mindestens 12 Kraft.",2,heart:true,symbol:RewardSymbol.WindReading);return true; } void Update() { var g=GameSession.I;if(!g)return;bool ready=Available,claimed=g.Save.Data.windReading;gift.enabled=halo.enabled=ready&&!claimed; if(!g.Playing)return;age+=Time.deltaTime;gift.transform.position=Gift+Vector2.up*Mathf.Sin(age*1.2f)*.06f; for(int i=0;iroof.At(1002,457).x&&p.x