Example #1
0
    private float _cooldown; // Normalized

    public Visibility(GameContext context, VisibilityData data, Entity entity, Gear item)
    {
        _data   = data;
        Entity  = entity;
        Item    = item;
        Context = context;
    }
Example #2
0
    private VisibilityData GetVisibilityDataOfVoxel(Vector3 position, Vector3 dist)
    {
        var data = new VisibilityData();

        data.Up      = GetVisibilityDataOfVoxel(position, Vector3.up, dist.y, out data.UpCollider);
        data.Down    = GetVisibilityDataOfVoxel(position, Vector3.down, dist.y, out data.DownCollider);
        data.Forward = GetVisibilityDataOfVoxel(position, Vector3.forward, dist.z, out data.ForwardCollider);
        data.Back    = GetVisibilityDataOfVoxel(position, Vector3.back, dist.z, out data.BackCollider);
        data.Right   = GetVisibilityDataOfVoxel(position, Vector3.right, dist.x, out data.RightCollider);
        data.Left    = GetVisibilityDataOfVoxel(position, Vector3.left, dist.x, out data.LeftCollider);

        return(data);
    }
        public OnEnterVisiblityClient(PacketReader reader, ChannelID channelID, NetID senderNetID)
        {
            this.SenderNetID = senderNetID;
            this.ChannelID   = channelID;

            int totalSize = (ushort)(reader.ReadUInt16() & 0x1FFF);

            for (; totalSize > 0;)
            {
                ushort size = reader.ReadUInt16();
                byte[] data = reader.ReadBytes(size);
                using (var reader2 = new PacketReader(new MemoryStream(data)))
                {
                    this.Packets.Add(reader2.ReadGamePacket(channelID));
                }
                totalSize -= 2;
                totalSize -= size;
            }
            this.VisibilityData = reader.ReadVisibilityData();
            this.ExtraBytes     = reader.ReadLeft();
        }
 public OnEnterVisiblityClientMessage(uint netId, VisibilityData data) : base(netId)
 {
     this.visibilityData = data;
 }
Example #5
0
        protected override void Reset()
        {
            base.Reset();

            visibility = new VisibilityData(false, false);
        }
Example #6
0
 public Visibility(VisibilityData data, ConsumableItemEffect item) : base(data, item)
 {
     _data = data;
 }
Example #7
0
 public Visibility(VisibilityData data, EquippedItem item) : base(data, item)
 {
     _data = data;
 }