Disabled Saves, moved Folders adn renamed Data files, and added a state machine to the cookie puzzle

This commit is contained in:
2025-11-25 16:02:55 +01:00
parent 57be1a941c
commit c5736f836a
113 changed files with 1414 additions and 25 deletions

View File

@@ -0,0 +1,54 @@
using Pixelplacement;
using UnityEngine;
using Core.SaveLoad;
public class ButterFlyBehaviour : MonoBehaviour
{
public AppleMachine butterStateMachine;
public Spline butterflightSpline;
public Transform butterflyObject;
public float flightDuration = 2f;
public float flightDelay = 0f;
private const float AnchorThreshold = 0.05f;
private Animator butterflyAnimator;
// Called when entering the butterfly flight state
public void OnEnable()
{
if (butterflightSpline == null || butterflyObject == null)
{
Debug.LogWarning("ButterFlyBehaviour: Missing spline or butterfly object reference.");
return;
}
if (butterflyObject != null )
{
butterflyAnimator = butterflyObject.GetComponentInChildren<Animator>();
}
butterflyAnimator.SetTrigger("BrokeOut");
GetComponent<AppleAudioSource>().Play(0);
Tween.Spline(
butterflightSpline,
butterflyObject,
0,
1,
false,
flightDuration,
flightDelay,
Tween.EaseInOut,
Tween.LoopType.None, HandleTweenStarted, HandleTweenFinished
);
}
public void HandleTweenStarted()
{
}
public void HandleTweenFinished()
{
butterStateMachine.ChangeState("Free");
}
}