Behaviours
BxVPMTableManager Class Reference

Inherits BxTableManager.

Public Member Functions

VPinMameTypeLib.Controller GetVPMController ()
 Visual PinMAME extended Plugin interface getter.
 
override void Init ()
 
virtual void InitVPM (string romName, int version)
 
override void OnDisable ()
 FixeUpdate is called before physics (faster) More...
 
override void SetDMDObject (string name, string DMDBehaviour="BxBasicDMD")
 Link an Object to the DMD texture updater.
 
void SetDMDObjects (string[] names, string DMDBehaviour="BxBasicDMD")
 
override void LateUpdate ()
 LateUpdate is called after everything (slower)
 
override void ChangedLampsCallBack ()
 Update Changed lamps states from the lamps state array.
 
override void ChangedSolenoidsCallBack ()
 Update Changed solenoids states from the lamps state array.
 
override void ChangedGIsCallBack ()
 Update Changed GIs states from the GI state array.
 
override void LampsCallBack ()
 Update lamps states from the lamps VPM Lamp state.
 
override void SolenoidsCallBack ()
 Update ALL Solenoids states from the solenoids state array.
 
override void SetSwitch (int slot, bool state)
 Update ALL GI states from the GIs state array.
 
override void Reset ()
 Reset controller.
 
- Public Member Functions inherited from BxTableManager
delegate void SlotStateCallBack (int slot, bool b)
 CallBack prototype for slot state change.
 
delegate void IntSlotStateCallBack (int slot, int b)
 CallBack prototype for slot state change (integer)
 
delegate void BehaviourStateCallBack (BxActivable a, bool b)
 CallBack prototype for behaviour state change.
 
virtual void PreInit ()
 Pre-initialization step.
 
virtual void PostInit ()
 Post-initialization step.
 
virtual void InitDriver ()
 Initialize table driver.
 
virtual void InitInputManager ()
 Initialize table driver.
 
void RegisterFlipperBehaviour (BxBasicFlip f)
 Called after all initializations.
 
virtual void Update ()
 Update is called once per frame (before rendering)
 
virtual void FixedUpdate ()
 FixeUpdate is called before physics (faster)
 
virtual void InitArrays (int nbLamps, int nbSolenoids, int nbGIs, int nbSwitches)
 Initialize arrays.
 
virtual void InitSubwaySystem ()
 Initialize Subway System (must be redefined in children classes)
 
void GenerateAction (string actionName, bool state=true)
 generate artificially an action normally handled by driver/input manager
 
BxPlunger AddPlungerBehaviour (string plungerName, string behaviour="BxPlunger", float posTravel=60f, float negTravel=20f)
 Add plunger behaviour.
 
List< GameObject > ScanUnassignedLamps ()
 
BxActivable AddLamp (string name, int lampSlot, string behaviourName="BxBasicLamp")
 Link lamp array slot to Unity object.
 
void AddLampCallBack (int slot, SlotStateCallBack cb)
 Add a lamp callback for the given lamp slot.
 
virtual void InitLampsObjects ()
 
virtual void SetLampsEnabled (bool b)
 Enable or disable Lamps objects.
 
virtual BxActivable AddSolenoid (string name, int solenoidSlot, string behaviourName="BxSolenoid")
 Link solenoid array slot to Unity object.
 
void AddSolenoidCallBack (int slot, SlotStateCallBack cb)
 Add a solenoid callback for the given solenoid slot.
 
virtual void SetSolenoidsEnabled (bool b)
 Enable or disable Solenoids objects.
 
virtual void InitSolenoidsObjects ()
 
virtual BxActivable AddGI (string name, int GISlot, string behaviourName="BxBasicLamp")
 Link GI array slot to Unity object.
 
void AddGICallBack (int slot, IntSlotStateCallBack cb)
 Add a GI callback for the given GI slot.
 
virtual void InitGIsObjects ()
 
virtual void SetGIsEnabled (bool b)
 Enable or disable Lamps objects.
 
virtual BxBasicSwitch AddSwitch (string name, int switchSlot, string behaviourName="BxBasicSwitch")
 Link switch array slot to Unity object.
 
void AddSwitchCallBack (int slot, SlotStateCallBack cb)
 Add a switch callback for the given switch slot.
 
virtual void InitSwitchesObjects ()
 
virtual void GIsCallBack ()
 Update ALL GI states from the GIs state array.
 
virtual bool GetSwitch (int slot)
 
virtual bool GetLamp (int slot)
 
virtual bool GetSolenoid (int slot)
 
virtual int GetGI (int slot)
 
virtual void SetLamp (int slot, bool state)
 
virtual void SetSolenoid (int slot, bool state)
 
virtual void SetGI (int slot, int state)
 
int GetLampsMin ()
 
int GetLampsMax ()
 
int GetSolenoidsMin ()
 
int GetSolenoidsMax ()
 
int GetGIsMin ()
 
int GetGIsMax ()
 
int GetSwitchesMin ()
 
int GetSwitchesMax ()
 
virtual void AskReset ()
 
void PulseSwitch (int switchSlot, int ms=5, int delay=0)
 Pulse de switch for "ms" ms in "delay" ms.
 
void PulseSolenoid (int slot, int ms=5, int delay=0)
 Pulse de switch for "ms" ms in "delay" ms.
 

Public Attributes

bool s_Debug =false
 Debug flag.
 
- Public Attributes inherited from BxTableManager
Dictionary< string, LampAssignmentm_assignedLamps = new Dictionary<string,LampAssignment>()
 

Static Public Attributes

static int s_vpmPendingAudioDeviceNumber =-1
 Audio device to setup the next time VPM will be launched.
 
static List< string > s_audioDevicesDescriptions = new List<string>()
 Audio devices descriptions.
 
- Static Public Attributes inherited from BxTableManager
static BxTableManager s_TableManager
 
static Globals.EventVoid g_FinishedCB = null
 

Protected Member Functions

override void InitDOF (string romName="")
 Direct Output Framework Inititialization.
 
string ReadAudioDeviceNameFromXml (string path="Config/options.ui.puo")
 
- Protected Member Functions inherited from BxTableManager
void DOF (char type, int num, int v)
 Direct Send dof event.
 

Protected Attributes

string m_romName = ""
 saved rom name for restart
 
int m_version = 100
 saved min version for restart
 
VPinMameTypeLib.Controller m_Controller
 Visual PinMAME extended Plugin interface.
 
- Protected Attributes inherited from BxTableManager
int m_nbLamps
 Number of lamps.
 
List< BxActivable >[] m_Lamps
 Lamps Behaviour arrays.
 
SlotStateCallBack[] m_LampsCB
 Lamps Callbacks arrays.
 
int[] m_LampsArray
 Lamps state fixed array.
 
int[] m_ChangedLampsArray
 Changed Lamps state fixed array.
 
GCHandle m_LampsHandle
 Pointer to the Lamps state fixed array.
 
GCHandle m_ChangedLampsHandle
 Pointer to the Changed Lamps state fixed array.
 
int m_nbChangedLamps =0
 Number of changed Lamps since the last call.
 
int m_nbSolenoids
 Number of solenoids.
 
List< BxActivable >[] m_Solenoids
 Solenoids Behaviour arrays.
 
SlotStateCallBack[] m_SolenoidsCB
 Solenoids Callbacks arrays.
 
int[] m_SolenoidsArray
 Solenoids state fixed array.
 
int[] m_ChangedSolenoidsArray
 ChangedSolenoids state fixed array.
 
GCHandle m_SolenoidsHandle
 Pointer to the Solenoids state fixed array.
 
GCHandle m_ChangedSolenoidsHandle
 Pointer to the Changed Solenoids state fixed array.
 
int m_nbChangedSolenoids =0
 Number of changed Solenoids since the last call.
 
int m_nbGIs
 Number of GIs.
 
List< BxActivable >[] m_GIs
 GIs Behaviour arrays.
 
IntSlotStateCallBack[] m_GIsCB
 GIs Callbacks arrays.
 
int[] m_GIsArray
 GIs state fixed array.
 
int[] m_ChangedGIsArray
 Changed GIs state fixed array.
 
GCHandle m_GIsHandle
 Pointer to the GIs state fixed array.
 
GCHandle m_ChangedGIsHandle
 Pointer to the Changed GIs state fixed array.
 
int m_nbChangedGIs =0
 Number of changed GI since the last call.
 
int m_nbSwitches
 Number of switches.
 
Dictionary< int, List< BxActivable > > m_Switches
 Switches Behaviour arrays.
 
Dictionary< int, SlotStateCallBackm_SwitchesCB
 GIs Callbacks arrays.
 
Dictionary< int, int > m_SwitchesArray
 Switches state fixed array.
 
int[] m_ChangedSwitchesArray
 Changed Switches state fixed array.
 
GCHandle m_ChangedSwitchesHandle
 Pointer to the Changed Switches state fixed array.
 
int m_nbChangedSwitches =0
 Number of changed Switches since the last call.
 
BxDriver m_driver
 Pointer to the table driver.
 
List< BxBasicFlipm_rfb = new List<BxBasicFlip>()
 right behaviours
 
List< BxBasicFlipm_lfb = new List<BxBasicFlip>()
 left flippers behaviours
 
bool m_AutomaticFlipActionCB =true
 tell if the flippers are automatically actioned (without waiting corresponding solenoid)
 
bool m_reseting = false
 Reseting flag (multithread handle)
 
bool started =false
 
DirectOutput.Pinball m_dof = null
 Direct Output Framework object.
 
int m_switchMinNum = 100000000
 
int m_switchMaxNum = -100000000
 
- Protected Attributes inherited from BxBehaviour
ImporterParams m_ip = null
 

Additional Inherited Members

- Properties inherited from BxBehaviour
ImporterParams Params [get]
 

Member Function Documentation

override void BxVPMTableManager.OnDisable ( )
virtual

FixeUpdate is called before physics (faster)

Free the pinned array handles and stop VPM controller

Reimplemented from BxTableManager.


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