BxMech Class Reference

Inherits BxBehaviour.

Inherited by BxVPMMech.


struct  SwitchSteps

Public Member Functions

void AddSwitch (int slot, int first, int last, int interval=0)
 Specifies a switch to be automatically updated by the mechanics handler.
virtual void Start ()
virtual void FixedUpdate ()
virtual void GraphicCallBack (int pos, int lastPos)
 Graphic callbacks.
virtual void GraphicCallBack (int pos, int speed, int lastPos)

Public Attributes

const int vpmMechOneSol = 0x00
 constants More...
const int vpmMechOneDirSol = 0x10
 (TO TEST) The first solenoid controls the power to the second solenoid controls the direction.
const int vpmMechTwoDirSol = 0x20
 (TO TEST) The first solenoid controls clockwise movement and the second solenoid controls counter-clockwise movement.
const int vpmMechStepSol = 0x40
 (TO TEST) Two solenoids control a step motor
const int vpmMechCircle = 0x00
 (TO TEST) The mechanic moves in a circle and comes back to the starting point
const int vpmMechStopEnd = 0x02
 (TO TEST) The mechanics stops when it reaches either end point.
const int vpmMechReverse = 0x04
 The mechanic moves from one end to the other and then moves back without the motor changing direction.
const int vpmMechLinear = 0x00
 The mechanic moves at a constant speed from one end to the other (default)
const int vpmMechNonLinear = 0x01
 (NOT IMPLEMENTED) The mechanics speed is slow at the endpoints and fast in the middle
const int vpmMechSlow = 0x00
 Normal handler. Updated ~60 times per second. (default)
const int vpmMechFast = 0x80
 (IMPLICIT?) A fast handler. Sometimes required for very fast puls controlled mechanics (e.g. step motors). Update speed is ~240 times per second.
const int vpmMechStepSw = 0x00
 The switches are updated based on mechanincs “step” value (default)
const int vpmMechLengthSw = 0x100
 (NOT IMPLEMENTED) The switches are updated based on mechanics “length” value.
int m_Sol1 =0
 Specifies the solenoids used to control the playfield mechanics.
List< SwitchStepsm_sw = new List<SwitchSteps>()
int m_MType =vpmMechOneSol + vpmMechReverse + vpmMechLinear
 Integer defining the type of mechanics (sample: m_MType = BxMech.vpmMechOneSol + BxMech.vpmMechReverse + BxMech.vpmMechLinear)
int m_Length =0
int m_Steps =10
 The number of the positions reported back by the mechanic handler.
int m_Step =0
int m_LastStep =0
int m_Speed =0
int m_LastSpeed =0
int m_Acc =0
int m_Retardation =0
float m_elapsedTime =0f
float stepTime

Protected Member Functions

void Advance ()
 advance one step depending on mech type
void StaticCheckSwitches ()
void CheckSwitches ()
void AdvanceReverse ()
void AdvanceStopEnd ()
void AdvanceCircle ()
void SolenoidCallBack (int slot, bool state)

Protected Attributes

bool m_Sol1Activated =false
 Solenoids activation state.
bool m_Sol2Activated =false
int m_Dir =1
- Protected Attributes inherited from BxBehaviour
ImporterParams m_ip = null

Additional Inherited Members

- Properties inherited from BxBehaviour
ImporterParams Params [get]

Member Data Documentation

int BxMech.m_Length =0

Specifies the length from one end to the other or a full circle (vpmMechCircle). The length parameter is the number 1/60th second the motor must be on.

const int BxMech.vpmMechOneSol = 0x00


A single solneoid controls the power to the motor. One direction only.

The documentation for this class was generated from the following file: