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

            Initialize();
        }
Ejemplo 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);
        }