Shatter::Data::Entity
Inherits JSON::Serializable < Reference < Object
Constructors
new(eid : UInt32, uuid : UUID, type : String, data : Int32 | Nil, x : Float64 = 0.0, y : Float64 = 0.0, z : Float64 = 0.0, yaw : Float64 = 0.0, pitch : Float64 = 0.0, vx : Float64 = 0.0, vy : Float64 = 0.0, vz : Float64 = 0.0)
Sourcenew(eid : UInt32, uuid : UUID, type : String, x : Float64 = 0.0, y : Float64 = 0.0, z : Float64 = 0.0, yaw : Float64 = 0.0, pitch : Float64 = 0.0, head : Float64 | Nil = 0.0, vx : Float64 = 0.0, vy : Float64 = 0.0, vz : Float64 = 0.0)
Sourcenew(pull : JSON::PullParser)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
data
Sourcedata=(data : Int32 | Nil)
Sourceeid
Sourceeid=(eid : UInt32)
Sourcehead
Sourcehead=(head : Float64 | Nil)
Sourceinspect(io : IO)
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
pitch
Sourcepitch=(pitch : Float64)
Sourceplayer_name
Sourceplayer_name=(player_name : String | Nil)
Sourceproperties
Sourceproperties=(properties : Hash(String, Property))
Sourceto_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
type
Sourcetype=(type : String)
Sourceuuid
Sourceuuid=(uuid : UUID)
Sourcevx
Sourcevx=(vx : Float64)
Sourcevy
Sourcevy=(vy : Float64)
Sourcevz
Sourcevz=(vz : Float64)
Sourcex=(x : Float64)
Sourcey=(y : Float64)
Sourceyaw
Sourceyaw=(yaw : Float64)
Sourcez=(z : Float64)
Source