Is() 공개 메소드

Returns true if entity is of the given data type.
public Is ( DataType type ) : bool
type DataType
리턴 bool
예제 #1
0
파일: Send.World.cs 프로젝트: Kuukrow/aura
        /// <summary>
        /// Broadcasts EntityAppears|ItemAppears|PropAppears in entity's region.
        /// </summary>
        /// <param name="entity"></param>
        public static void EntityAppears(Entity entity)
        {
            var op = Op.EntityAppears;
            if (entity.Is(EntityType.Item))
                op = Op.ItemAppears;
            else if (entity.Is(EntityType.Prop))
                op = Op.PropAppears;

            var packet = new Packet(op, MabiId.Broadcast);
            packet.AddPublicEntityInfo(entity);

            entity.Region.Broadcast(packet, entity, false);
        }
예제 #2
0
파일: Send.World.cs 프로젝트: Kuukrow/aura
        /// <summary>
        /// Broadcasts EntityDisappears|ItemDisappears in entity's region.
        /// </summary>
        /// <param name="entity"></param>
        public static void EntityDisappears(Entity entity)
        {
            var op = Op.EntityDisappears;
            if (entity.Is(EntityType.Item))
                op = Op.ItemDisappears;

            var packet = new Packet(op, MabiId.Broadcast);
            packet.PutLong(entity.EntityId);
            packet.PutByte(0);

            entity.Region.Broadcast(packet, entity, false);
        }