PixelCrushers.DialogueSystem.PersistentDeadBody Class Reference

Customized for RFPS. More...

Inheritance diagram for PixelCrushers.DialogueSystem.PersistentDeadBody:
Collaboration diagram for PixelCrushers.DialogueSystem.PersistentDeadBody:

Public Types

enum  RecordOn { RecordOn.Destroy, RecordOn.Disable, RecordOn.Destroy, RecordOn.Disable }
 
enum  RecordOn { RecordOn.Destroy, RecordOn.Disable, RecordOn.Destroy, RecordOn.Disable }
 

Public Member Functions

void OnApplyPersistentData ()
 When applying persistent data, check the variable. More...
 
void OnLevelWillBeUnloaded ()
 If the level is being unloaded, this GameObject will be destroyed. More...
 
void OnApplicationQuit ()
 If the application is ending, don't listen, as this can log errors in the console. More...
 
void OnDestroy ()
 If the GameObject is destroyed, set its Lua variable true. More...
 
void OnDisable ()
 
void OnApplyPersistentData ()
 When applying persistent data, check the variable. More...
 
void OnLevelWillBeUnloaded ()
 If the level is being unloaded, this GameObject will be destroyed. More...
 
void OnApplicationQuit ()
 If the application is ending, don't listen, as this can log errors in the console. More...
 
void OnDestroy ()
 If the GameObject is destroyed, set its Lua variable true. More...
 
void OnDisable ()
 

Public Attributes

RecordOn recordOn = RecordOn.Destroy
 
string variableName = string.Empty
 Assign a Lua variable name to keep track of whether the GameObject has been destroyed. More...
 

Protected Member Functions

virtual void OnEnable ()
 Only listen for OnDestroy if the script has been enabled. More...
 
virtual void OnEnable ()
 Only listen for OnDestroy if the script has been enabled. More...
 

Protected Attributes

bool listenForOnDestroy = false
 

Properties

string? ActualVariableName [get]
 

Detailed Description

Customized for RFPS.

This persistent data component keeps track of when the GameObject has been destroyed or disabled. The next time the level or game is loaded, if the GameObject has previously been destroyed/disabled, this script will destroy/deactivate it again.

It also spawns a replacement dead body when destroyed/deactivated again when loading a game.

Member Enumeration Documentation

◆ RecordOn [1/2]

Enumerator
Destroy 
Disable 
Destroy 
Disable 

◆ RecordOn [2/2]

Enumerator
Destroy 
Disable 
Destroy 
Disable 

Member Function Documentation

◆ OnApplicationQuit() [1/2]

void PixelCrushers.DialogueSystem.PersistentDeadBody.OnApplicationQuit ( )

If the application is ending, don't listen, as this can log errors in the console.

◆ OnApplicationQuit() [2/2]

void PixelCrushers.DialogueSystem.PersistentDeadBody.OnApplicationQuit ( )

If the application is ending, don't listen, as this can log errors in the console.

◆ OnApplyPersistentData() [1/2]

void PixelCrushers.DialogueSystem.PersistentDeadBody.OnApplyPersistentData ( )

When applying persistent data, check the variable.

If it's true, the GameObject has been destroyed previously, so destroy it now.

◆ OnApplyPersistentData() [2/2]

void PixelCrushers.DialogueSystem.PersistentDeadBody.OnApplyPersistentData ( )

When applying persistent data, check the variable.

If it's true, the GameObject has been destroyed previously, so destroy it now.

◆ OnDestroy() [1/2]

void PixelCrushers.DialogueSystem.PersistentDeadBody.OnDestroy ( )

If the GameObject is destroyed, set its Lua variable true.

◆ OnDestroy() [2/2]

void PixelCrushers.DialogueSystem.PersistentDeadBody.OnDestroy ( )

If the GameObject is destroyed, set its Lua variable true.

◆ OnDisable() [1/2]

void PixelCrushers.DialogueSystem.PersistentDeadBody.OnDisable ( )

◆ OnDisable() [2/2]

void PixelCrushers.DialogueSystem.PersistentDeadBody.OnDisable ( )

◆ OnEnable() [1/2]

virtual void PixelCrushers.DialogueSystem.PersistentDeadBody.OnEnable ( )
protectedvirtual

Only listen for OnDestroy if the script has been enabled.

◆ OnEnable() [2/2]

virtual void PixelCrushers.DialogueSystem.PersistentDeadBody.OnEnable ( )
protectedvirtual

Only listen for OnDestroy if the script has been enabled.

◆ OnLevelWillBeUnloaded() [1/2]

void PixelCrushers.DialogueSystem.PersistentDeadBody.OnLevelWillBeUnloaded ( )

If the level is being unloaded, this GameObject will be destroyed.

We don't want to count this in the variable, so disable the script.

◆ OnLevelWillBeUnloaded() [2/2]

void PixelCrushers.DialogueSystem.PersistentDeadBody.OnLevelWillBeUnloaded ( )

If the level is being unloaded, this GameObject will be destroyed.

We don't want to count this in the variable, so disable the script.

Member Data Documentation

◆ listenForOnDestroy

bool PixelCrushers.DialogueSystem.PersistentDeadBody.listenForOnDestroy = false
protected

◆ recordOn

RecordOn PixelCrushers.DialogueSystem.PersistentDeadBody.recordOn = RecordOn.Destroy

◆ variableName

string PixelCrushers.DialogueSystem.PersistentDeadBody.variableName = string.Empty

Assign a Lua variable name to keep track of whether the GameObject has been destroyed.

If this is blank, it uses the name of the GameObject for the variable name. If the variable is true, the GameObject has been destroyed.

Property Documentation

◆ ActualVariableName

string PixelCrushers.DialogueSystem.PersistentDeadBody.ActualVariableName
getprotected

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