private void _Create(TypeObject obj)
        {
            var soul = SupplyEvent(_Id, obj);

            lock (_Souls)
                _Souls.Add(soul);
        }
Example #2
0
        private void _OnSupply(T obj)
        {
            var to = new TypeObject(typeof(T), obj);

            lock (_TypeObjects)
                _TypeObjects.Items.Add(to);
        }
        private void _Destroy(TypeObject obj)
        {
            ISoul soul;

            lock (_Souls)
            {
                soul = (from s in _Souls where s.IsTypeObject(obj) select s).First();
                _Souls.Remove(soul);
            }
            UnsupplyEvent(_Id, soul.Id);
        }
Example #4
0
        private ISoul _PropertyBind(long soul_id, int property_id, TypeObject type_object)
        {
            var soul = _Bind(type_object.Instance, type_object.Type, false, 0);

            PackagePropertySoul package = new PackagePropertySoul();

            package.OwnerId    = soul_id;
            package.PropertyId = property_id;
            package.EntiryId   = soul.Id;
            _Queue.Push(ServerToClientOpCode.AddPropertySoul, package.ToBuffer(_Serializer));

            return(soul);
        }
Example #5
0
 bool ISoul.IsTypeObject(TypeObject obj)
 {
     return(this.ObjectInstance == obj.Instance && this.ObjectType == obj.Type);
 }
Example #6
0
 private ISoul _SupplySoul(int property_id, TypeObject type_object)
 {
     return(SupplySoulEvent(Id, property_id, type_object));
 }