This is a utility component to help synchronize the Dialogue System's Lua environment with the UFPS player.
More...
This is a utility component to help synchronize the Dialogue System's Lua environment with the UFPS player.
It synchronizes health and inventory.
◆ ActivateCurrentWeapon()
virtual void PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.ActivateCurrentWeapon |
( |
| ) |
|
|
virtual |
Activates the current weapon.
Used when ending a conversation.
◆ Awake()
virtual void PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.Awake |
( |
| ) |
|
|
virtual |
◆ CanStart_SetWeapon()
virtual bool PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.CanStart_SetWeapon |
( |
| ) |
|
|
protectedvirtual |
The bridge temporarily registers this method with UFPS when applying the Lua inventory data back into UFPS.
It prevents UFPS from playing equip/load animations.
- Returns
false
.
◆ DeactivateCurrentWeapon()
virtual void PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.DeactivateCurrentWeapon |
( |
| ) |
|
|
virtual |
Deactivates the current weapon.
Used when starting a conversation.
◆ GetPlayerField()
Lua.Result PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.GetPlayerField |
( |
string |
fieldName | ) |
|
Gets a player field in the Actor table.
- Returns
- The player field.
- Parameters
-
◆ SetPlayerField()
void PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.SetPlayerField |
( |
string |
fieldName, |
|
|
object |
value |
|
) |
| |
Sets a player field in the Actor table.
- Parameters
-
fieldName | Field name. |
value | Value. |
◆ Start()
virtual void PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.Start |
( |
| ) |
|
|
virtual |
◆ SyncFPInventoryToLua()
void PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.SyncFPInventoryToLua |
( |
| ) |
|
◆ SyncFPStatsToLua()
void PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.SyncFPStatsToLua |
( |
| ) |
|
◆ SyncFPToLua()
virtual void PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.SyncFPToLua |
( |
| ) |
|
|
virtual |
Records the UFPS player's data into the Dialogue System's Lua environment.
Records the player's health and inventory (weapons and items).
◆ SyncFPWeaponHandlerToLua()
void PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.SyncFPWeaponHandlerToLua |
( |
| ) |
|
Syncs the player's current weapon index to Lua.
◆ SyncLuaToFP()
virtual void PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.SyncLuaToFP |
( |
| ) |
|
|
virtual |
Updates the UFPS player's data with the current values in the Dialogue System's Lua environment.
Updates the player's health and inventory (weapons and items). Also uses fpPlayer.Register() to hook into CanStart_Weapon() to prevent UFPS from playing equip/load animations if the inventory has changed.
◆ SyncLuaToFPInventory()
void PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.SyncLuaToFPInventory |
( |
| ) |
|
◆ SyncLuaToFPStats()
void PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.SyncLuaToFPStats |
( |
| ) |
|
◆ SyncLuaToFPWeaponHandler()
void PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.SyncLuaToFPWeaponHandler |
( |
| ) |
|
Syncs the current weapon index stored in Lua to be the player's current weapon.
Since the bridge has temporarily disabled equip/load animations, we can set the weapon immediately. (In an earlier version of this script that lacked the code to disable equip/load animations, we invoked SetWeapon() after 0.5s.)
◆ debug
bool PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.debug = false |
◆ usableItemTypes
List<vp_ItemType> PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.usableItemTypes = new List<vp_ItemType>() |
The usable item types.
Assign all item types that the player can possibly use here. These item types will be synchronized with Lua.
◆ forceWield
bool PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.forceWield |
|
getset |
◆ fpInventory
vp_Inventory PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.fpInventory |
|
get |
◆ fpPlayer
vp_FPPlayerEventHandler PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.fpPlayer |
|
get |
◆ fpWeaponHandler
vp_FPWeaponHandler PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.fpWeaponHandler |
|
get |
◆ LuaPlayerIndex
string PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.LuaPlayerIndex |
|
get |
Gets the string index of the player in the Actor[]
table
The string index for Lua.
◆ LuaPlayerName
string PixelCrushers.DialogueSystem.UFPS.FPPlayerLuaBridge.LuaPlayerName |
|
get |
Gets the name of the player in the dialogue database
The name of the player in the dialogue database.
The documentation for this class was generated from the following file:
- D:/Documents/Unity Projects/Dialogue System/Dev/Integration/UFPS Integration/Assets/Dialogue System/Third Party Support/UFPS/Scripts/FPPlayerLuaBridge.cs