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

            SetComponent(componentId, component);
            return(component);
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
0
        public override IGameComponent AddComponent(int componentId, IGameComponent copyValue)
        {
            var component = GameCompoentInfo.Allocate(componentId);

            if (component is ICloneableComponent && copyValue is ICloneableComponent)
            {
                ((ICloneableComponent)component).CopyFrom(copyValue);
            }

            SetComponent(componentId, component);
            return(component);
        }
Ejemplo n.º 4
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);
        }