class Shatter::Data::Entity
- Shatter::Data::Entity
- Reference
- Object
Included Modules
- JSON::Serializable
Defined in:
shatter/data/entity.cr:18shatter/data/entity.cr:80
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)
- .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)
- .new(pull : JSON::PullParser)
Instance Method Summary
- #data : Int32 | Nil
- #data=(data : Int32 | Nil)
- #eid : UInt32
- #eid=(eid : UInt32)
- #head : Float64 | Nil
- #head=(head : Float64 | Nil)
-
#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.
- #pitch : Float64
- #pitch=(pitch : Float64)
- #player_name : String | Nil
- #player_name=(player_name : String | Nil)
- #properties : Hash(String, Property)
- #properties=(properties : Hash(String, Property))
-
#to_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
- #type : String
- #type=(type : String)
- #uuid : UUID
- #uuid=(uuid : UUID)
- #vx : Float64
- #vx=(vx : Float64)
- #vy : Float64
- #vy=(vy : Float64)
- #vz : Float64
- #vz=(vz : Float64)
- #x : Float64
- #x=(x : Float64)
- #y : Float64
- #y=(y : Float64)
- #yaw : Float64
- #yaw=(yaw : Float64)
- #z : Float64
- #z=(z : Float64)
Constructor Detail
def self.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)
#
def self.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)
#
Instance Method Detail
Description copied from class Reference
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>
Description copied from class Reference
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>