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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user