Initial commit

This commit is contained in:
HussienX72u
2026-07-21 08:56:10 +03:00
commit 4017028111
9410 changed files with 2150500 additions and 0 deletions
@@ -0,0 +1,49 @@
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using UnityEngine;
public class InteractionManager : MonoBehaviour
{
private static InteractionManager instance;
private CommandHandler commandHandler;
private GhostManagerV2 ghostManager;
private SelectionManager selectionManager;
private UIManager uiManager;
private void Awake()
{
if (instance == null) instance = this;
else Destroy(this.gameObject);
}
public static InteractionManager getInstance()
{
return instance;
}
private void Start()
{
commandHandler = CommandHandler.getInstance();
ghostManager = GhostManagerV2.getInstance();
selectionManager = SelectionManager.getInstance();
uiManager = UIManager.getInstance();
setupListeners();
}
private void setupListeners()
{
uiManager.onSelectEvent.AddListener(blockData =>
{
ghostManager.setupBlock(blockData);
});
ghostManager.onClearAddListener(() =>
{
uiManager.deselectUIInteractable();
});
}
}