public override void PostInitialize()
        {
            //Track down the IEntityStateComponent for this IGameObject, if they exists.
            stateComponent = this.Parent.GetComponent<IEntityStateComponent>();

            foreach (var behavior in behaviors)
                behavior.Value.PostInitialize();

            base.PostInitialize();
        }
        public override void PostInitialize()
        {
            //Track down the IEntityStateComponent for this IGameObject, if they exists.
            stateComponent = this.Parent.GetComponent <IEntityStateComponent>();

            foreach (var behavior in behaviors)
            {
                behavior.Value.PostInitialize();
            }

            base.PostInitialize();
        }
        public override void Reallocate()
        {
            //foreach (var behavior in behaviors)
            //{
            //    behavior.Value.Reallocate();
            //}

            //foreach (var behavior in behaviorsToRemove)
            //{
            //    behavior.Reallocate();
            //}

            //behaviors.Clear();
            //behaviorsToRemove.Clear();
            stateComponent  = null;
            behaviorFactory = null;
            actionManager   = null;

            base.Reallocate();
        }
        public override void Reallocate()
        {
            //foreach (var behavior in behaviors)
            //{
            //    behavior.Value.Reallocate();
            //}

            //foreach (var behavior in behaviorsToRemove)
            //{
            //    behavior.Reallocate();
            //}

            //behaviors.Clear();
            //behaviorsToRemove.Clear();
            stateComponent = null;
            behaviorFactory = null;
            actionManager = null;

            base.Reallocate();
        }