4 Commits

3 changed files with 7 additions and 3 deletions

View File

@@ -160,5 +160,9 @@ module CyberarmEngine
def to_s
"X: #{@x}, Y: #{@y}, Z: #{@z}, Weight: #{@weight}"
end
def to_h
{x: @x, y: @y, z: @z, weight: @weight}
end
end
end

View File

@@ -6,7 +6,7 @@ module CyberarmEngine
attr_reader :text, :textobject
def initialize(text, options={})
@text = text || ""
@text = text.to_s || ""
@options = options
@size = options[:size] || 18
@font = options[:font] || "sans-serif"#Gosu.default_font_name
@@ -72,7 +72,7 @@ module CyberarmEngine
end
def height
(@text.lines.count) * textobject.height
@text.lines.count > 0 ? (@text.lines.count) * textobject.height : @textobject.height
end
def draw

View File

@@ -1,4 +1,4 @@
module CyberarmEngine
NAME = "InDev"
VERSION = "0.4.0"
VERSION = "0.5.1"
end