Broke Protocol Game API Reference
1.39
Code reference for server and client scripting
|
Public Types | |
enum | LightColor { Red , Yellow , Green } |
Public Member Functions | |
bool | IgnoreCollision (Collider collider) |
void | ReloadGame (uint disconnectType) |
void | ShowLoadingWindow () |
void | ResetLoadingWindow (int loadTotal) |
void | IncrementTransferProgress (int length) |
Place | GetPlace (Transform t) |
List< BaseParameters > | SerializeLevel (bool checkSave) |
void | DeserializeLevel (List< BaseParameters > parameters) |
IEnumerator | ReadLevel (string path, MyCallback postProcess) |
void | ProcessMap () |
void | SaveLevel (string path, bool checkSave) |
bool | IsIntersectionBlocked (int direction) |
LightColor | GetIntersectionColor (int direction) |
Place | ClonePlace (Place place) |
Place | ClonePlace (Place place, int copyIndex, int offset) |
void | DestroyPlace (Place place) |
GameObject | GetPrefab (string path) |
ShEntity | GetEntity (int index) |
ShEntity | GetEntity (string name) |
T | GetEntity< T > (int index) |
T | GetEntity< T > (string name) |
bool | TryGetEntity (int index, out ShEntity entity) |
bool | TryGetEntity (string name, out ShEntity entity) |
bool | TryGetEntity< T > (int index, out T entity) |
bool | TryGetEntity< T > (string name, out T entity) |
void | SetMinPlaces (int index) |
Transform | AddPlace () |
void | SetPlace (int placeIndex) |
bool | Duplicate (Transform originalT, out Transform duplicateT) |
void | UpdateActiveVisibility () |
GameObject | InstantiateEditor (GameObject original, int placeIndex, Vector3 position, Quaternion rotation) |
void | Clear () |
List< Transform > | ActiveGameObjects () |
List< Transform > | AllTransforms () |
void | LoadAssetBundles () |
void | FinishCustomAssets () |
string | RegisterAssetBundle (string path, bool load, out byte[] data) |
string | RegisterAssetBundle (byte[] asset, bool load) |
Dictionary< string, AssetData > | GetAssetData (RuntimePlatform platform) |
float | WaterLevel (Vector3 position) |
void | GetSnapshot (GameObject g, RawImage image) |
void | CustomEnvironment () |
object[] | EnvironmentData () |
Static Public Member Functions | |
static int | PlaceItemCount (Place place) |
Static Public Member Functions inherited from BrokeProtocol.Utility.MonoBehaviourSingleton< SceneManager > | |
static void | Instantiate () |
Public Attributes | |
bool | gameStarted |
bool | isServer |
bool | isClient |
bool | isBuilder |
bool | forceGizmos = false |
LayerType[] | layerTypes |
float | time |
float | referenceTime |
List< Place > | places = new() |
int | currentPlace |
Bounds | worldBounds |
Dictionary< string, VisualTreeAsset > | customUIs = new() |
Dictionary< int, GameObject > | customObjects = new() |
Dictionary< int, Texture2D > | customSnapshots = new() |
Dictionary< int, string > | prefabCollection = new() |
Dictionary< int, ShEntity > | entityCollection = new() |
Dictionary< int, ShFurniture > | furnitureCollection = new() |
Dictionary< int, ShConsumable > | consumablesCollection = new() |
Dictionary< int, ShConsumable > | healerCollection = new() |
Transform | mTransform |
RectTransform | uiRect |
RectTransform | loadingRect |
List< ChildIndexActionPair > | childActionPairs = new() |
Dictionary< string, AssetData > | assetFiles = new() |
Dictionary< string, AssetData > | androidAssetFiles = new() |
bool | defaultEnvironment = true |
float | dayFraction |
float | weatherFraction |
float | cloudFraction |
Color | curSkyColor |
Color | curCloudColor |
Color | curWaterColor |
float | curCloudHeight |
Color | skyColor = new(1f, 0.6f, 0.5f) |
Color | cloudColor = new(1f, 0.3f, 0.3f) |
Color | waterColor = new(0.2f, 0.9f, 1f) |
float | cloudHeight = 140f |
float | dayLength = defaultDayLength |
byte[] | mapData |
byte[] | entityData |
string | mapHash |
byte[] | assetCacheExists |
bool | mapCacheExists |
int | loadProgress |
int | loadTotal |
float | lastSaveTime |
LoadingWindow | loadingWindow |
Static Public Attributes | |
const float | defaultDayLength = 1440f |
const float | waterMinZ = -6f |
const float | waterMaxZ = 5f |
Protected Member Functions | |
override void | Awake () |
Properties | |
bool | ServerRunning [get] |
bool | ShowCursor [get, set] |
float | LoadedFraction [get] |
Place | ExteriorPlace [get] |
Transform | ExteriorT [get] |
string | GetMapCachePath [get] |
Properties inherited from BrokeProtocol.Utility.MonoBehaviourSingleton< SceneManager > | |
virtual bool | DontDestroy [get] |
static T | Instance [get] |
|
inline |
|
inline |
|
inline |
|
inlineprotectedvirtual |
Reimplemented from BrokeProtocol.Utility.MonoBehaviourSingleton< SceneManager >.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
object[] BrokeProtocol.Managers.SceneManager.EnvironmentData | ( | ) |
|
inline |
Dictionary< string, AssetData > BrokeProtocol.Managers.SceneManager.GetAssetData | ( | RuntimePlatform | platform | ) |
ShEntity BrokeProtocol.Managers.SceneManager.GetEntity | ( | int | index | ) |
ShEntity BrokeProtocol.Managers.SceneManager.GetEntity | ( | string | name | ) |
T BrokeProtocol.Managers.SceneManager.GetEntity< T > | ( | int | index | ) |
T | : | ShEntity |
T BrokeProtocol.Managers.SceneManager.GetEntity< T > | ( | string | name | ) |
T | : | ShEntity |
|
inline |
Place BrokeProtocol.Managers.SceneManager.GetPlace | ( | Transform | t | ) |
GameObject BrokeProtocol.Managers.SceneManager.GetPrefab | ( | string | path | ) |
|
inline |
bool BrokeProtocol.Managers.SceneManager.IgnoreCollision | ( | Collider | collider | ) |
|
inline |
|
inline |
bool BrokeProtocol.Managers.SceneManager.IsIntersectionBlocked | ( | int | direction | ) |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool BrokeProtocol.Managers.SceneManager.TryGetEntity | ( | int | index, |
out ShEntity | entity ) |
bool BrokeProtocol.Managers.SceneManager.TryGetEntity | ( | string | name, |
out ShEntity | entity ) |
|
inline |
T | : | ShEntity |
|
inline |
T | : | ShEntity |
|
inline |
|
inline |
Dictionary<string, AssetData> BrokeProtocol.Managers.SceneManager.androidAssetFiles = new() |
byte [] BrokeProtocol.Managers.SceneManager.assetCacheExists |
Dictionary<string, AssetData> BrokeProtocol.Managers.SceneManager.assetFiles = new() |
List<ChildIndexActionPair> BrokeProtocol.Managers.SceneManager.childActionPairs = new() |
Color BrokeProtocol.Managers.SceneManager.cloudColor = new(1f, 0.3f, 0.3f) |
float BrokeProtocol.Managers.SceneManager.cloudFraction |
float BrokeProtocol.Managers.SceneManager.cloudHeight = 140f |
Dictionary<int, ShConsumable> BrokeProtocol.Managers.SceneManager.consumablesCollection = new() |
Color BrokeProtocol.Managers.SceneManager.curCloudColor |
float BrokeProtocol.Managers.SceneManager.curCloudHeight |
int BrokeProtocol.Managers.SceneManager.currentPlace |
Color BrokeProtocol.Managers.SceneManager.curSkyColor |
Color BrokeProtocol.Managers.SceneManager.curWaterColor |
Dictionary<int, GameObject> BrokeProtocol.Managers.SceneManager.customObjects = new() |
Dictionary<int, Texture2D> BrokeProtocol.Managers.SceneManager.customSnapshots = new() |
Dictionary<string, VisualTreeAsset> BrokeProtocol.Managers.SceneManager.customUIs = new() |
float BrokeProtocol.Managers.SceneManager.dayFraction |
float BrokeProtocol.Managers.SceneManager.dayLength = defaultDayLength |
|
static |
bool BrokeProtocol.Managers.SceneManager.defaultEnvironment = true |
Dictionary<int, ShEntity> BrokeProtocol.Managers.SceneManager.entityCollection = new() |
byte [] BrokeProtocol.Managers.SceneManager.entityData |
bool BrokeProtocol.Managers.SceneManager.forceGizmos = false |
Dictionary<int, ShFurniture> BrokeProtocol.Managers.SceneManager.furnitureCollection = new() |
bool BrokeProtocol.Managers.SceneManager.gameStarted |
Dictionary<int, ShConsumable> BrokeProtocol.Managers.SceneManager.healerCollection = new() |
bool BrokeProtocol.Managers.SceneManager.isBuilder |
bool BrokeProtocol.Managers.SceneManager.isClient |
bool BrokeProtocol.Managers.SceneManager.isServer |
float BrokeProtocol.Managers.SceneManager.lastSaveTime |
LayerType [] BrokeProtocol.Managers.SceneManager.layerTypes |
RectTransform BrokeProtocol.Managers.SceneManager.loadingRect |
LoadingWindow BrokeProtocol.Managers.SceneManager.loadingWindow |
int BrokeProtocol.Managers.SceneManager.loadProgress |
int BrokeProtocol.Managers.SceneManager.loadTotal |
bool BrokeProtocol.Managers.SceneManager.mapCacheExists |
byte [] BrokeProtocol.Managers.SceneManager.mapData |
string BrokeProtocol.Managers.SceneManager.mapHash |
Transform BrokeProtocol.Managers.SceneManager.mTransform |
List<Place> BrokeProtocol.Managers.SceneManager.places = new() |
Dictionary<int, string> BrokeProtocol.Managers.SceneManager.prefabCollection = new() |
float BrokeProtocol.Managers.SceneManager.referenceTime |
Color BrokeProtocol.Managers.SceneManager.skyColor = new(1f, 0.6f, 0.5f) |
float BrokeProtocol.Managers.SceneManager.time |
RectTransform BrokeProtocol.Managers.SceneManager.uiRect |
Color BrokeProtocol.Managers.SceneManager.waterColor = new(0.2f, 0.9f, 1f) |
|
static |
|
static |
float BrokeProtocol.Managers.SceneManager.weatherFraction |
Bounds BrokeProtocol.Managers.SceneManager.worldBounds |
|
get |
|
get |
|
get |
|
get |
|
get |
|
getset |