class

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)
Source
new(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)
Source
new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

data
Source
data=(data : Int32 | Nil)
Source
eid=(eid : UInt32)
Source
head
Source
head=(head : Float64 | Nil)
Source
inspect(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>
Source
pitch
Source
pitch=(pitch : Float64)
Source
player_name
Source
player_name=(player_name : String | Nil)
Source
properties
Source
properties=(properties : Hash(String, Property))
Source
to_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>
Source
type
Source
type=(type : String)
Source
uuid
Source
uuid=(uuid : UUID)
Source
vx=(vx : Float64)
Source
vy=(vy : Float64)
Source
vz=(vz : Float64)
Source
x=(x : Float64)
Source
y=(y : Float64)
Source
yaw=(yaw : Float64)
Source
z=(z : Float64)
Source

Nested types