跳到主要内容
版本:0.4.1

Struct HpComponent

Namespace: ReadyM.Wukong.Common.ECS.Components
Assembly: ReadyM.Wukong.Common.dll

Holds entity HP, max HP, scaling factor and death state.

public struct HpComponent : IComponent, INetSerializable

Implements​

IComponent, INetSerializable

Inherited Members​

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Properties​

Hp​

public float Hp { get; set; }

Property Value​

float

HpMaxBase​

public float HpMaxBase { get; set; }

Property Value​

float

HpMaxMulPercent​

public int HpMaxMulPercent { get; set; }

Property Value​

int

IsDead​

public bool IsDead { get; set; }

Property Value​

bool

Methods​

Assign(in HpComponent)​

public void Assign(in HpComponent value)

Parameters​

value HpComponent

Deserialize(NetDataReader)​

public void Deserialize(NetDataReader reader)

Parameters​

reader NetDataReader

GetChangeComponent()​

public Type GetChangeComponent()

Returns​

Type

HpMaxBaseNotifyChanged(int)​

public void HpMaxBaseNotifyChanged(int id)

Parameters​

id int

HpMaxMulPercentNotifyChanged(int)​

public void HpMaxMulPercentNotifyChanged(int id)

Parameters​

id int

HpNotifyChanged(int)​

public void HpNotifyChanged(int id)

Parameters​

id int

IsDeadNotifyChanged(int)​

public void IsDeadNotifyChanged(int id)

Parameters​

id int

Serialize(NetDataWriter)​

public void Serialize(NetDataWriter writer)

Parameters​

writer NetDataWriter

  • Properties
    • Hp
    • HpMaxBase
    • HpMaxMulPercent
    • IsDead
  • Methods
    • Assign(in HpComponent)
    • Deserialize(NetDataReader)
    • GetChangeComponent()
    • HpMaxBaseNotifyChanged(int)
    • HpMaxMulPercentNotifyChanged(int)
    • HpNotifyChanged(int)
    • IsDeadNotifyChanged(int)
    • Serialize(NetDataWriter)