public override void OnAddedToContainer() { base.OnAddedToContainer(); m_character = Entity as MyCharacter; foreach(var soundEmitter in m_soundEmitters) { soundEmitter.Entity = Entity as MyEntity; } if(m_windEmitter != null) m_windEmitter.Entity = Entity as MyEntity; if (m_oxygenEmitter != null) m_oxygenEmitter.Entity = Entity as MyEntity; m_lastUpdateMovementState = m_character.GetCurrentMovementState(); m_characterPhysicalMaterial = MyStringHash.GetOrCompute(m_character.Definition.PhysicalMaterial); InitSounds(); }
public override void OnAddedToContainer() { base.OnAddedToContainer(); m_character = Entity as MyCharacter; foreach(var soundEmitter in m_soundEmitters) { soundEmitter.Entity = Entity as MyEntity; } m_lastUpdateMovementState = m_character.GetCurrentMovementState(); InitSounds(); }