Server LuaCsForBarotrauma
NetEntityEvent.cs
1
using
System;
2
3
namespace
Barotrauma.Networking
4
{
5
abstract
class
NetEntityEvent
6
{
7
public
interface
IData
{ }
8
9
public
readonly
Entity
Entity
;
10
public
readonly UInt16
ID
;
11
12
public
UInt16
EntityID
=>
Entity
.
ID
;
13
14
//arbitrary extra data that will be passed to the Write method of the serializable entity
15
//(the index of an itemcomponent for example)
16
public
IData
Data
{
get
;
private
set
; }
17
18
public
bool
Sent
;
19
20
protected
NetEntityEvent
(
INetSerializable
serializableEntity, UInt16
id
)
21
{
22
this.ID = id;
23
this.Entity = serializableEntity as
Entity
;
24
}
25
26
public
void
SetData
(
IData
data)
27
{
28
this.
Data
= data;
29
}
30
31
public
bool
IsDuplicate
(
NetEntityEvent
other)
32
{
33
if
(other.
Entity
!=
this
.
Entity
) {
return
false
; }
34
35
return
Equals(
Data
, other.
Data
);
36
}
37
}
38
}
Barotrauma.Entity
Definition:
Entity.cs:13
Barotrauma.Entity.Entity
Entity(Submarine submarine, ushort id)
Definition:
Entity.cs:90
Barotrauma.Entity.ID
readonly ushort ID
Unique, but non-persistent identifier. Stays the same if the entities are created in the exactly same...
Definition:
Entity.cs:43
Barotrauma.Networking.NetEntityEvent
Definition:
NetEntityEvent.cs:6
Barotrauma.Networking.NetEntityEvent.IsDuplicate
bool IsDuplicate(NetEntityEvent other)
Definition:
NetEntityEvent.cs:31
Barotrauma.Networking.NetEntityEvent.ID
readonly UInt16 ID
Definition:
NetEntityEvent.cs:10
Barotrauma.Networking.NetEntityEvent.SetData
void SetData(IData data)
Definition:
NetEntityEvent.cs:26
Barotrauma.Networking.NetEntityEvent.Entity
readonly Entity Entity
Definition:
NetEntityEvent.cs:9
Barotrauma.Networking.NetEntityEvent.Data
IData Data
Definition:
NetEntityEvent.cs:16
Barotrauma.Networking.NetEntityEvent.Sent
bool Sent
Definition:
NetEntityEvent.cs:18
Barotrauma.Networking.NetEntityEvent.NetEntityEvent
NetEntityEvent(INetSerializable serializableEntity, UInt16 id)
Definition:
NetEntityEvent.cs:20
Barotrauma.Networking.NetEntityEvent.EntityID
UInt16 EntityID
Definition:
NetEntityEvent.cs:12
Barotrauma.Networking.INetSerializable
Definition:
INetSerializable.cs:3
Barotrauma.Networking.NetEntityEvent.IData
Definition:
NetEntityEvent.cs:7
Barotrauma.Networking
Definition:
BarotraumaShared/SharedSource/LuaCs/Lua/LuaBarotraumaAdditions.cs:9
Barotrauma
BarotraumaShared
SharedSource
Networking
NetEntityEvent
NetEntityEvent.cs
Generated by
1.9.1