Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_WheelSlotInfo.c
Go to the documentation of this file.
2 {
3 }
4 class SCR_WheelSlotInfo : RegisteringComponentSlotInfo
5 {
6  [Attribute("-1", UIWidgets.Slider, "VehicleWheeledSimulation wheel index", "-1 1000 1")]
7  protected int m_iWheelIndex;
8 
9  //------------------------------------------------------------------------------------------------
10  override void OnAttachedEntity(IEntity entity)
11  {
12  HitZoneContainerComponent hitzoneContainer = HitZoneContainerComponent.Cast(entity.FindComponent(HitZoneContainerComponent));
13  if (!hitzoneContainer)
14  return;
15 
16  SCR_WheelHitZone hitZone = SCR_WheelHitZone.Cast(hitzoneContainer.GetDefaultHitZone());
17  if (hitZone)
18  hitZone.SetWheelIndex(m_iWheelIndex);
19  }
20 
21  //------------------------------------------------------------------------------------------------
22  override void OnDetachedEntity(IEntity entity)
23  {
24  HitZoneContainerComponent hitzoneContainer = HitZoneContainerComponent.Cast(entity.FindComponent(HitZoneContainerComponent));
25  if (!hitzoneContainer)
26  return;
27 
28  SCR_WheelHitZone hitZone = SCR_WheelHitZone.Cast(hitzoneContainer.GetDefaultHitZone());
29  if (hitZone)
30  hitZone.SetWheelIndex(-1);
31  }
32 };
RegisteringComponentSlotInfo
Definition: SCR_WheelSlotInfo.c:1
OnDetachedEntity
override void OnDetachedEntity(IEntity entity)
Runs every time an entity is detached from the slot.
Definition: SCR_WheelSlotInfo.c:22
EntitySlotInfo
Adds ability to attach an object to a slot.
Definition: EntitySlotInfo.c:8
HitZoneContainerComponent
Definition: HitZoneContainerComponent.c:12
Attribute
RegisteringComponentSlotInfo EntitySlotInfo Attribute("-1", UIWidgets.Slider, "VehicleWheeledSimulation wheel index", "-1 1000 1")] protected int m_iWheelIndex
OnAttachedEntity
override void OnAttachedEntity(IEntity entity)
Runs every time an entity is attached to the slot.
Definition: SCR_WheelSlotInfo.c:10