Class: Bayonetta::CLPFile::Header

Inherits:
LibBin::Structure
  • Object
show all
Defined in:
lib/bayonetta/clp.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_bxm_header(h) ⇒ Object



59
60
61
62
63
# File 'lib/bayonetta/clp.rb', line 59

def self.from_bxm_header(h)
  nh = self::new
  nh.from_bxm_header(h)
  nh
end

Instance Method Details

#from_bxm_header(h) ⇒ Object



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/bayonetta/clp.rb', line 40

def from_bxm_header(h)
  @num = h.at_css("m_Num").content.to_i
  @limit_spring_rate = h.at_css("m_LimitSpringRate").content.to_f
  @spd_rate = h.at_css("m_SpdRate").content.to_f
  @stretchy = h.at_css("m_Stretchy").content.to_f
  @bundle_num = h.at_css("m_BundleNum").content.to_i
  @bundle_num_2 = h.at_css("m_BundleNum2").content.to_i
  @thick = h.at_css("m_Thick").content.to_f
  @gravity_vec = FVector.from_bxm_vector(h.at_css("m_GravityVec").content)
  @gravity_parts_no = h.at_css("m_GravityPartsNo").content.to_i
  @first_bundle_rate = h.at_css("m_FirstBundleRate").content.to_f
  @wind_vec = FVector.from_bxm_vector(h.at_css("m_WindVec").content)
  @wind_parts_no = h.at_css("m_WindPartsNo").content.to_i
  @wind_offset = FVector.from_bxm_vector(h.at_css("m_WindOffset").content)
  @wind_sin = h.at_css("m_WindSin").content.to_f
  @hit_adjust_rate = h.at_css("m_HitAdjustRate").content.to_f
  self
end