Class: Bayonetta::CLPFile::Cloth
- Inherits:
-
LibBin::Structure
- Object
- LibBin::Structure
- Bayonetta::CLPFile::Cloth
- Defined in:
- lib/bayonetta/clp.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_bxm_cloth(c) ⇒ Object
89 90 91 92 93 |
# File 'lib/bayonetta/clp.rb', line 89 def self.from_bxm_cloth(c) cl = self::new cl.from_bxm_cloth(c) cl end |
Instance Method Details
#from_bxm_cloth(h) ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/bayonetta/clp.rb', line 77 def from_bxm_cloth(h) @no = h.at_css("no").content.to_i @no_up = h.at_css("noUp").content.to_i @no_down = h.at_css("noDown").content.to_i @no_side = h.at_css("noSide").content.to_i @no_poly = h.at_css("noPoly").content.to_i @no_fix = h.at_css("noFix").content.to_i @rot_limit = h.at_css("rotLimit").content.to_f @offset = FVector.from_bxm_vector(h.at_css("offset").content) self end |
#remap(map, poly = true, fix = true) ⇒ Object
95 96 97 98 99 100 101 102 |
# File 'lib/bayonetta/clp.rb', line 95 def remap(map, poly = true, fix = true) @no = check_and_remap_bone(map, @no) @no_up = check_and_remap_bone(map, @no_up) @no_down = check_and_remap_bone(map, @no_down) @no_side = check_and_remap_bone(map, @no_side) @no_poly = ( poly ? check_and_remap_bone(map, @no_poly) : 4095 ) @no_fix = ( fix ? check_and_remap_bone(map, @no_fix) : 4095 ) end |