Documentation ¶
Overview ¶
Package fake provides basic mocks for IEntity and IProperty. See examples/mocking (https://github.com/markus-wa/demoinfocs-golang/tree/master/examples/mocking).
Index ¶
- type Entity
- func (e *Entity) ApplyUpdate(reader *bitread.BitReader)
- func (e *Entity) BindPosition(pos *r3.Vector)
- func (e *Entity) BindProperty(name string, variable interface{}, valueType st.PropertyValueType)
- func (e *Entity) Destroy()
- func (e *Entity) FindProperty(name string) *st.Property
- func (e *Entity) FindPropertyI(name string) st.IProperty
- func (e *Entity) ID() int
- func (e *Entity) OnCreateFinished(delegate func())
- func (e *Entity) OnDestroy(delegate func())
- func (e *Entity) OnPositionUpdate(handler func(pos r3.Vector))
- func (e *Entity) Position() r3.Vector
- func (e *Entity) Properties() []st.Property
- func (e *Entity) PropertiesI() []st.IProperty
- func (e *Entity) ServerClass() *st.ServerClass
- type Property
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entity ¶
Entity is a mock for of sendtables.IEntity.
func (*Entity) ApplyUpdate ¶
ApplyUpdate is a mock-implementation of IEntity.ApplyUpdate().
func (*Entity) BindPosition ¶
BindPosition is a mock-implementation of IEntity.BindPosition().
func (*Entity) BindProperty ¶
func (e *Entity) BindProperty(name string, variable interface{}, valueType st.PropertyValueType)
BindProperty is a mock-implementation of IEntity.BindProperty().
func (*Entity) Destroy ¶
func (e *Entity) Destroy()
Destroy is a mock-implementation of IEntity.Destroy().
func (*Entity) FindProperty ¶
FindProperty is a mock-implementation of IEntity.FindProperty().
func (*Entity) FindPropertyI ¶ added in v1.2.0
FindPropertyI is a mock-implementation of IEntity.FindPropertyI().
func (*Entity) OnCreateFinished ¶
func (e *Entity) OnCreateFinished(delegate func())
OnCreateFinished is a mock-implementation of IEntity.OnCreateFinished().
func (*Entity) OnDestroy ¶
func (e *Entity) OnDestroy(delegate func())
OnDestroy is a mock-implementation of IEntity.OnDestroy().
func (*Entity) OnPositionUpdate ¶
OnPositionUpdate is a mock-implementation of IEntity.OnPositionUpdate().
func (*Entity) Properties ¶
Properties is a mock-implementation of IEntity.Properties().
func (*Entity) PropertiesI ¶ added in v1.2.0
PropertiesI is a mock-implementation of IEntity.PropertiesI().
func (*Entity) ServerClass ¶
func (e *Entity) ServerClass() *st.ServerClass
ServerClass is a mock-implementation of IEntity.ServerClass().
type Property ¶ added in v1.2.0
Property is a mock for of sendtables.IProperty.
func (*Property) Bind ¶ added in v1.2.0
func (p *Property) Bind(variable interface{}, valueType st.PropertyValueType)
Bind is a mock-implementation of IProperty.Bind().
func (*Property) OnUpdate ¶ added in v1.2.0
func (p *Property) OnUpdate(handler st.PropertyUpdateHandler)
OnUpdate is a mock-implementation of IProperty.OnUpdate().
func (*Property) Value ¶ added in v1.2.0
func (p *Property) Value() st.PropertyValue
Value is a mock-implementation of IProperty.Value().