|
XposeCraft
1.0.1-rc1
Developer API
|
Data structures that make up the Model of a Player used within a game. More...
Classes | |
| class | EventList |
| class | RegisteredEventsDictionary |
Public Types | |
| enum | LoseReason { LoseReason.ExceptionThrown, LoseReason.AllBuildingsDestroyed, LoseReason.TimeoutStalemate } |
| Reason of losing. More... | |
Public Member Functions | |
| void | EnemyOnSight (GameObject enemyActorGameObject, Actor enemyActor, List< GameObject > myActorGameObjectsSaw, List< Actor > myActorsSaw, VisionState previousState, VisionState newState) |
| void | Win () |
| void | Lost (LoseReason loseReason) |
| void | Lost (Exception exception) |
Public Attributes | |
| Faction | Faction |
| Faction of the Player, allied Players will share it. More... | |
| int | FactionIndex |
| PlaceType | MyBase |
| This Player's Base. More... | |
| PlaceType | EnemyBase |
| This Player's Enemy's Base. More... | |
| RegisteredEventsDictionary | RegisteredEvents |
| Actions hooked to Events that can, but don't have to be, run at any time. More... | |
| List< Unit > | Units |
| List< Building > | Buildings |
| List< Resource > | Resources |
| List< Unit > | EnemyVisibleUnits |
| List< Building > | EnemyVisibleBuildings |
Static Public Attributes | |
| static Player | CurrentPlayer |
| Curently executing Player to be used as a Model. More... | |
Properties | |
| bool | LostGame [get, set] |
| True if already lost. More... | |
| bool | ExceptionOnDeadUnitAction [get, set] |
Data structures that make up the Model of a Player used within a game.
It is a good idea not to persist it as a prefab, as the instance will usually hold references to Scene objects.
|
strong |
| void XposeCraft.GameInternal.Player.EnemyOnSight | ( | GameObject | enemyActorGameObject, |
| Actor | enemyActor, | ||
| List< GameObject > | myActorGameObjectsSaw, | ||
| List< Actor > | myActorsSaw, | ||
| VisionState | previousState, | ||
| VisionState | newState | ||
| ) |
| void XposeCraft.GameInternal.Player.Lost | ( | LoseReason | loseReason | ) |
| void XposeCraft.GameInternal.Player.Lost | ( | Exception | exception | ) |
| void XposeCraft.GameInternal.Player.Win | ( | ) |
| List<Building> XposeCraft.GameInternal.Player.Buildings |
|
static |
Curently executing Player to be used as a Model.
Needs to be replaced before executing any Event.
| List<Building> XposeCraft.GameInternal.Player.EnemyVisibleBuildings |
| List<Unit> XposeCraft.GameInternal.Player.EnemyVisibleUnits |
| int XposeCraft.GameInternal.Player.FactionIndex |
| RegisteredEventsDictionary XposeCraft.GameInternal.Player.RegisteredEvents |
Actions hooked to Events that can, but don't have to be, run at any time.
| List<Resource> XposeCraft.GameInternal.Player.Resources |
| List<Unit> XposeCraft.GameInternal.Player.Units |
|
getset |
|
getset |
True if already lost.