chunk 1: core gameplay scripts scenes runtime assets

This commit is contained in:
2026-04-06 11:02:34 +03:00
parent fa0388bc79
commit 0d11a097d8
703 changed files with 2292651 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
public class ButtonClickDetector : MonoBehaviour, IPointerClickHandler
{
public UnityEvent onClick;
public bool Clicked { get; set; }
public void OnPointerClick(PointerEventData eventData)
{
Clicked = true;
onClick.Invoke();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bee16f2af4e522b4c82a66e80d442828
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,40 @@
using UnityEngine;
using UnityEngine.UI;
public class ButtonClickSound : MonoBehaviour
{
public AudioClip clickSound;
private Button button;
private AudioSource audioSource;
private void Awake()
{
button = GetComponent<Button>();
audioSource = GetComponent<AudioSource>();
// Create an AudioSource component if one doesn't already exist
if (audioSource == null)
{
audioSource = gameObject.AddComponent<AudioSource>();
}
// Set the AudioClip to play when the button is clicked
audioSource.clip = clickSound;
// Make sure the AudioSource doesn't play automatically
audioSource.playOnAwake = false;
}
private void Start()
{
// Attach the button click event to the PlayClickSound() method
button.onClick.AddListener(PlayClickSound);
}
public void PlayClickSound()
{
// Play the click sound using the Manager
GameManager.Instance.PlaySound(clickSound);
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 8d4618d29e8ff4346b4cf90d10e23bb8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- clickSound: {fileID: 8300000, guid: 712edf32f2eaf0247abd5118428699d2, type: 3}
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: