Esempio n. 1
0
        public override IGameComponent AddComponent(int componentId)
        {
            var component = GameCompoentInfo.Allocate(componentId);

            _list.Add(component);
            var wrapper = ComponentWrapper.Allocate(component);

            _wrapperLists.Add(wrapper);
            _componentListDirty = true;
            return(component);
        }
Esempio n. 2
0
        public override IGameComponent AddComponent(int componentId, IGameComponent copyValue)
        {
            var component = GameCompoentInfo.Allocate(componentId);

            ((ICloneableComponent)component).CopyFrom(copyValue);

            _list.Add(component);
            var wrapper = ComponentWrapper.Allocate(component);

            _wrapperLists.Add(wrapper);
            _componentListDirty = true;
            return(component);
        }