Add this class to an empty component in your scene, and it'll allow you to swap characters in your scene when pressing the SwapButton (P, by default) Each character in your scene will need to have a CharacterSwap class on it, and the corresponding PlayerID. You can see an example of such a setup in the MinimalCharacterSwap demo scene
More...
|
string | SwapButtonName = "Player1_SwapCharacter" |
| the name of the axis to use to catch input and trigger a swap on press More...
|
|
string | PlayerID = "Player1" |
| the PlayerID set on the Characters you want to swap between More...
|
|
Add this class to an empty component in your scene, and it'll allow you to swap characters in your scene when pressing the SwapButton (P, by default) Each character in your scene will need to have a CharacterSwap class on it, and the corresponding PlayerID. You can see an example of such a setup in the MinimalCharacterSwap demo scene
◆ GetCurrentIndex()
virtual int MoreMountains.CorgiEngine.CharacterSwapManager.GetCurrentIndex |
( |
| ) |
|
|
virtual |
Finds which character is currently active and considered the current one
- Returns
◆ HandleInput()
virtual void MoreMountains.CorgiEngine.CharacterSwapManager.HandleInput |
( |
| ) |
|
|
protectedvirtual |
If the user presses the Swap button, we swap characters
◆ OnDisable()
virtual void MoreMountains.CorgiEngine.CharacterSwapManager.OnDisable |
( |
| ) |
|
|
protectedvirtual |
On disable we stop listening for events
◆ OnEnable()
virtual void MoreMountains.CorgiEngine.CharacterSwapManager.OnEnable |
( |
| ) |
|
|
protectedvirtual |
On enable we start listening for events
◆ OnMMEvent()
virtual void MoreMountains.CorgiEngine.CharacterSwapManager.OnMMEvent |
( |
CorgiEngineEvent |
engineEvent | ) |
|
|
virtual |
On Level Start, we initialize our list
- Parameters
-
◆ SwapCharacter()
virtual void MoreMountains.CorgiEngine.CharacterSwapManager.SwapCharacter |
( |
| ) |
|
|
virtual |
Changes the current character to the next one in line
◆ Update()
virtual void MoreMountains.CorgiEngine.CharacterSwapManager.Update |
( |
| ) |
|
|
protectedvirtual |
On Update, we watch for input
◆ UpdateList()
virtual void MoreMountains.CorgiEngine.CharacterSwapManager.UpdateList |
( |
| ) |
|
|
virtual |
Grabs all CharacterSwap equipped characters in the scene and stores them in a list, sorted by Order
◆ _characterSwapArray
CharacterSwap [] MoreMountains.CorgiEngine.CharacterSwapManager._characterSwapArray |
|
protected |
◆ _characterSwapList
◆ _swapEvent
◆ PlayerID
string MoreMountains.CorgiEngine.CharacterSwapManager.PlayerID = "Player1" |
the PlayerID set on the Characters you want to swap between
◆ SwapButtonName
string MoreMountains.CorgiEngine.CharacterSwapManager.SwapButtonName = "Player1_SwapCharacter" |
the name of the axis to use to catch input and trigger a swap on press
The documentation for this class was generated from the following file: