Esempio n. 1
0
        private void Awake()
        {
            if (_setAsActiveInstance)
            {
                ImpactManagerInstance.SetInstance(this);
            }

            Initialize();
        }
Esempio n. 2
0
        private void OnDestroy()
        {
            //Dispose of any active continuous interactions
            for (int i = 0; i < activeContinuousInteractionResults.Length; i++)
            {
                IContinuousInteractionResult c = activeContinuousInteractionResults[i];

                if (c != null)
                {
                    c.Dispose();
                }
            }

            //Clear the instance
            //This won't do anything if the active instance is not this
            ImpactManagerInstance.ClearInstance(this);
        }