add project files

This commit is contained in:
Boris Nikolaev
2026-08-14 01:58:31 +03:00
parent 9134cad79b
commit 5f1e94b653
4399 changed files with 12286903 additions and 0 deletions
@@ -0,0 +1,37 @@
using System;
using UnityEngine;
using OHM.UnityToolkit;
using OHM.UnityToolkit.Vibration;
using UnityEngine.Serialization;
public class CheckpointsHandler : MonoBehaviour
{
[SerializeField]
[FormerlySerializedAs("passCheckpoint")]
private SFX _passCheckpoint;
public Checkpoints lastCheckpoint { get; private set; }
public event Action<Checkpoints> onCheckpoints;
private void OnTriggerEnter(Collider other)
{
Checkpoints checkpoint = other.GetComponentInParent<Checkpoints>();
if (!(checkpoint == null) && !checkpoint.isPass)
{
lastCheckpoint = checkpoint;
checkpoint.PassCheckpoint();
_passCheckpoint.Play(base.transform);
VibrationManager.Vibrate(VibrationManager.VibrationType.MEDIUM);
if (this.onCheckpoints != null)
{
this.onCheckpoints(checkpoint);
}
}
}
private void UnPause(bool success)
{
Time.timeScale = 1f;
}
}