Exemplo n.º 1
0
 private void Awake()
 {
     if (Instance != null && Instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         Instance = this;
     }
 }
Exemplo n.º 2
0
 void Singleton()
 {
     if (instance == null || instance != this)
     {
         instance = this;
     }
     else if (instance == this)
     {
         Destroy(gameObject);
     }
 }
    private void OnEnable()
    {
        _poolMan            = (SimplePoolManager)target;
        _getTarget          = new SerializedObject(_poolMan);
        _thisList           = _getTarget.FindProperty("Pools");
        _expandBool         = _getTarget.FindProperty("ExpandIfEmpty");
        _activeObjects      = _getTarget.FindProperty("ActiveObjects");
        _inactiveObjects    = _getTarget.FindProperty("InactiveObjects");
        _totalPooledObjects = _getTarget.FindProperty("TotalPooledObjects");

        _showPool  = new List <bool>();
        _showPools = new List <bool>();
    }
Exemplo n.º 4
0
 private void Start()
 {
     Instance = this;
     _poolMan = SimplePoolManager.Instance;
 }