Class: Tone
- Inherits:
-
Object
- Object
- Tone
- Defined in:
- lib/R3EXS/RGSS3.rb
Overview
RPG Maker VX Ace Tone 类
Instance Attribute Summary collapse
-
#blue ⇒ Object
Returns the value of attribute blue.
-
#gray ⇒ Object
Returns the value of attribute gray.
-
#green ⇒ Object
Returns the value of attribute green.
-
#red ⇒ Object
Returns the value of attribute red.
Class Method Summary collapse
-
._load(obj) ⇒ Tone
反序列化 Tone 对象.
Instance Method Summary collapse
-
#_dump(_level) ⇒ String
序列化 Tone 对象.
-
#initialize(red, green, blue, gray) ⇒ Color
constructor
初始化 Tone 对象.
Constructor Details
#initialize(red, green, blue, gray) ⇒ Color
初始化 Tone 对象
48 49 50 51 52 53 |
# File 'lib/R3EXS/RGSS3.rb', line 48 def initialize(red, green, blue, gray) @red = red @green = green @blue = blue @gray = gray end |
Instance Attribute Details
#blue ⇒ Object
Returns the value of attribute blue.
35 36 37 |
# File 'lib/R3EXS/RGSS3.rb', line 35 def blue @blue end |
#gray ⇒ Object
Returns the value of attribute gray.
35 36 37 |
# File 'lib/R3EXS/RGSS3.rb', line 35 def gray @gray end |
#green ⇒ Object
Returns the value of attribute green.
35 36 37 |
# File 'lib/R3EXS/RGSS3.rb', line 35 def green @green end |
#red ⇒ Object
Returns the value of attribute red.
35 36 37 |
# File 'lib/R3EXS/RGSS3.rb', line 35 def red @red end |
Class Method Details
Instance Method Details
#_dump(_level) ⇒ String
序列化 Tone 对象
58 59 60 |
# File 'lib/R3EXS/RGSS3.rb', line 58 def _dump(_level) [@red, @green, @blue, @gray].pack('D4') end |