Add missing codecs
This commit is contained in:
parent
4037791a46
commit
7585da2a51
@ -121,6 +121,14 @@ class FieldSynchronizer {
|
||||
private val observers = ArrayList<IField<*>>()
|
||||
private val dirtyFields = ArrayList<IField<*>>()
|
||||
|
||||
fun byte(
|
||||
value: Byte = 0,
|
||||
getter: FieldGetter<Byte>? = null,
|
||||
setter: FieldSetter<Byte>? = null,
|
||||
): Field<Byte> {
|
||||
return Field(value, ByteValueCodec, getter, setter)
|
||||
}
|
||||
|
||||
fun bool(
|
||||
value: Boolean = false,
|
||||
getter: FieldGetter<Boolean>? = null,
|
||||
@ -177,6 +185,14 @@ class FieldSynchronizer {
|
||||
return Field(value, IntValueCodec, getter, setter)
|
||||
}
|
||||
|
||||
fun varInt(
|
||||
value: Int = 0,
|
||||
getter: FieldGetter<Int>? = null,
|
||||
setter: FieldSetter<Int>? = null,
|
||||
): Field<Int> {
|
||||
return Field(value, VarIntValueCodec, getter, setter)
|
||||
}
|
||||
|
||||
fun fraction(
|
||||
value: ImpreciseFraction = ImpreciseFraction.ZERO,
|
||||
getter: FieldGetter<ImpreciseFraction>? = null,
|
||||
|
Loading…
Reference in New Issue
Block a user