Fixed SoundBird Bug
This commit is contained in:
@@ -12,6 +12,7 @@ public class soundBird_TakeOffBehaviour : MonoBehaviour
|
||||
private StateMachine stateMachine;
|
||||
private Animator animator;
|
||||
private TweenBase objectTween;
|
||||
public soundBird_FlyingBehaviour flyingBehaviour;
|
||||
|
||||
public AppleAudioSource audioSource;
|
||||
|
||||
@@ -48,4 +49,19 @@ public class soundBird_TakeOffBehaviour : MonoBehaviour
|
||||
stateMachine.ChangeState("SoundBirdFlyAround"); // Change to the desired state name
|
||||
}
|
||||
}
|
||||
|
||||
// Added for cameraSwitcher
|
||||
public void StartLanding()
|
||||
{
|
||||
if (objectTween != null)
|
||||
{
|
||||
objectTween.Cancel();
|
||||
}
|
||||
if (stateMachine != null)
|
||||
{
|
||||
flyingBehaviour.midFlightPosition = SoundBirdObject.position;
|
||||
stateMachine.ChangeState("SoundBirdLanding");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user