![]() |
Adventure Creator
1.76.2
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
PlayerPrefab (int[] idArray) | |
Player | GetSceneInstance (bool spawnIfNotPresent=false) |
Gets the runtime scene instance of the Player More... | |
void | SpawnInScene (bool makeActivePlayer) |
Spawns a new instance of the Player if one is not currently present. More... | |
void | SpawnInScene (Scene scene) |
Spawns a new instance of the Player if one is not currently present, and places them in a specific scene. This will not be the active Player. More... | |
void | SetInitialPosition (PlayerData playerData) |
void | RemoveFromScene () |
void | ShowGUI (string apiPrefix) |
void | ShowStartDataGUI (string apiPrefix) |
Static Public Member Functions | |
static void | FindPlayerReferences (int playerID, string playerName) |
Public Attributes | |
Player | playerOb |
int | ID |
bool | isDefault |
int | startingSceneIndex = 0 |
ChooseSceneBy | chooseSceneBy = ChooseSceneBy.Number |
string | startingSceneName = "" |
bool | useSceneDefaultPlayerStart = true |
int | startingPlayerStartID |
A data container for a Player that is spawned automatically at runtime, and whose data is tracked automatically.
AC.PlayerPrefab.PlayerPrefab | ( | int[] | idArray | ) |
The default Constructor. An array of ID numbers is required, to ensure its own ID is unique.
Player AC.PlayerPrefab.GetSceneInstance | ( | bool | spawnIfNotPresent = false | ) |
void AC.PlayerPrefab.RemoveFromScene | ( | ) |
Removes any runtime instance of the Player from the scene
void AC.PlayerPrefab.SpawnInScene | ( | bool | makeActivePlayer | ) |
void AC.PlayerPrefab.SpawnInScene | ( | Scene | scene | ) |
ChooseSceneBy AC.PlayerPrefab.chooseSceneBy = ChooseSceneBy.Number |
How to reference the Player's starting scene, if not the default (Name, Number)
int AC.PlayerPrefab.ID |
A unique identifier
bool AC.PlayerPrefab.isDefault |
If True, this Player is the game's default
int AC.PlayerPrefab.startingPlayerStartID |
The ConstantID value of the PlayerStart to appear at, if not the default Player
int AC.PlayerPrefab.startingSceneIndex = 0 |
The scene index to start in, if the Player is not the default, and chooseSceneBy = ChooseSceneBy.Number
string AC.PlayerPrefab.startingSceneName = "" |
The name of the scene to start in, if the Player is not the default, and chooseSceneBy = ChooseSceneBy.Name
bool AC.PlayerPrefab.useSceneDefaultPlayerStart = true |
If True, then the Player will appear at their initial scene's Default PlayerStart - as opposed to one specified here