Added project

This commit is contained in:
2023-06-11 00:35:07 +03:00
parent 5bfa765889
commit f06629200c
545 changed files with 44339 additions and 2 deletions

View File

@@ -0,0 +1,35 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameManager : MonoBehaviour {
#region Singleton
public static GameManager Instance { get; private set; }
#endregion
public Dictionary<GameObject, Health> healthContainer;
public Dictionary<GameObject, Coin> coinContainer;
public Dictionary<GameObject, BuffReceiver> buffReceiverContainer;
public Dictionary<GameObject, ItemComponent> itemsContainer;
[HideInInspector] public PlayerInventory inventory;
public ItemBase ItemBase;
private void Awake() {
Instance = this;
healthContainer = new Dictionary<GameObject, Health>();
coinContainer = new Dictionary<GameObject, Coin>();
buffReceiverContainer = new Dictionary<GameObject, BuffReceiver>();
itemsContainer = new Dictionary<GameObject, ItemComponent>();
}
//Вариант создания пула объектов
// private void Start() {
// var healthObjects = FindObjectsOfType<Health>();
// foreach (var health in healthObjects) {
// healthContainer.Add(health.gameObject, health);
// }
// }
}