Behaviours
BxTableManager Class Reference

Inherits BxBehaviour.

Inherited by BxOriginalTableManager, and BxVPMTableManager.

Classes

class  LampAssignment
 class to check if all lamps have been assigned and their status More...
 

Public Member Functions

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 Init ()
 
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 LateUpdate ()
 LateUpdate is called after everything (slower)
 
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 SetDMDObject (string name, string DMDBehaviour="BxBasicDMD")
 Link an Object to the DMD texture updater.
 
virtual void ChangedLampsCallBack ()
 Update Changed lamps states from the lamps state array. More...
 
virtual void ChangedSolenoidsCallBack ()
 Update Changed solenoids states from the lamps state array. More...
 
virtual void ChangedGIsCallBack ()
 Update Changed GI states from the lamps state array. More...
 
virtual void LampsCallBack ()
 Update ALL lamps states from the lamps state array.
 
virtual void SolenoidsCallBack ()
 Update ALL Solenoids states from the solenoids state array.
 
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)
 
virtual void SetSwitch (int slot, bool state)
 
int GetLampsMin ()
 
int GetLampsMax ()
 
int GetSolenoidsMin ()
 
int GetSolenoidsMax ()
 
int GetGIsMin ()
 
int GetGIsMax ()
 
int GetSwitchesMin ()
 
int GetSwitchesMax ()
 
virtual void OnDisable ()
 Free the pinned array handles.
 
virtual void AskReset ()
 
virtual void Reset ()
 Reset all arrays state.
 
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

Dictionary< string, LampAssignmentm_assignedLamps = new Dictionary<string,LampAssignment>()
 

Static Public Attributes

static BxTableManager s_TableManager
 
static Globals.EventVoid g_FinishedCB = null
 

Protected Member Functions

virtual void InitDOF (string romName="")
 Direct Output Framework Inititialization.
 
void DOF (char type, int num, int v)
 Direct Send dof event.
 

Protected Attributes

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

virtual void BxTableManager.ChangedGIsCallBack ( )
virtual

Update Changed GI states from the lamps state array.

< Reset changed solenoids

Reimplemented in BxVPMTableManager.

virtual void BxTableManager.ChangedLampsCallBack ( )
virtual

Update Changed lamps states from the lamps state array.

< Reset changed lamps

Reimplemented in BxVPMTableManager.

virtual void BxTableManager.ChangedSolenoidsCallBack ( )
virtual

Update Changed solenoids states from the lamps state array.

< Reset changed solenoids

Reimplemented in BxVPMTableManager.

virtual void BxTableManager.InitGIsObjects ( )
virtual

Link GI array to Unity objects (called by InitArrays) (Must be inherited and use AddGI)

virtual void BxTableManager.InitLampsObjects ( )
virtual

Link lamp array to Unity objects (called by InitArrays) (Must be inherited and use AddLamp)

virtual void BxTableManager.InitSolenoidsObjects ( )
virtual

Link solenoid array to Unity objects (called by InitArrays) (Must be inherited and use AddSolenoid)

Flipper solenoids (all games) sLRFlipper = 46 sLLFlipper = 48 sURFlipper = 34 sULFlipper = 36


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