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

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

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