Example #1
0
        public void RemoveBehaivour(BaseEntityBehaviour behaviour)
        {
            MDebug.Assert(behaviour.GetOwner() == this
                          , "Entity"
                          , "component.GetOwner() == this");

            behaviour.SetOwner(null);
            behaviour.DestorySelf();
        }
Example #2
0
        public void AddBehaviour(BaseEntityBehaviour behaviour)
        {
            MDebug.Assert(behaviour.GetOwner() == null
                          , "Entity"
                          , "component.GetOwner() == null");

            behaviour.SetOwner(this);
            behaviour.SetEnable(true);
        }