Redid the SoundBird Logic of flight

changed the flight of the bird to be able to have more control over the takeoff, loops and landing.
This commit is contained in:
2025-09-24 17:24:51 +02:00
parent f5a6eff85a
commit e69542879b
22 changed files with 2413 additions and 602 deletions

View File

@@ -8,7 +8,6 @@ public class SoundGenerator : MonoBehaviour
[SerializeField] private AudioClip enterSound;
[SerializeField] private AudioSource audioSource;
[SerializeField] private StateMachine soundBirdSMRef;
[SerializeField] private soundBird_Spooked_FlyBehaviour spookedBirdRef;
private bool playerInside = false;
private SpriteRenderer spriteRenderer;
@@ -38,8 +37,7 @@ public class SoundGenerator : MonoBehaviour
}
if (soundBirdSMRef != null && soundBirdSMRef.currentState.name == "SoundBird")
{
soundBirdSMRef.ChangeState("SoundBirdSpooked"); // Replace with your actual method/state
spookedBirdRef.initiateTweenSpline();
soundBirdSMRef.ChangeState("SoundBirdTakeoff"); // Replace with your actual method/state
}
// Play sound and change animation/state here if needed