Broke Protocol Game API Reference  1.39
Code reference for server and client scripting
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Properties | List of all members
BrokeProtocol.Managers.SceneManager Class Reference
Inheritance diagram for BrokeProtocol.Managers.SceneManager:
BrokeProtocol.Utility.MonoBehaviourSingleton< SceneManager >

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< BaseParametersSerializeLevel (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)
 
GetEntity< T > (int index)
 
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, AssetDataGetAssetData (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< Placeplaces = 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, ShEntityentityCollection = new()
 
Dictionary< int, ShFurniturefurnitureCollection = new()
 
Dictionary< int, ShConsumableconsumablesCollection = new()
 
Dictionary< int, ShConsumablehealerCollection = new()
 
Transform mTransform
 
RectTransform uiRect
 
RectTransform loadingRect
 
List< ChildIndexActionPairchildActionPairs = new()
 
Dictionary< string, AssetDataassetFiles = new()
 
Dictionary< string, AssetDataandroidAssetFiles = 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]
 

Member Enumeration Documentation

◆ LightColor

Enumerator
Red 
Yellow 
Green 

Member Function Documentation

◆ ActiveGameObjects()

List< Transform > BrokeProtocol.Managers.SceneManager.ActiveGameObjects ( )
inline

◆ AddPlace()

Transform BrokeProtocol.Managers.SceneManager.AddPlace ( )
inline

◆ AllTransforms()

List< Transform > BrokeProtocol.Managers.SceneManager.AllTransforms ( )
inline

◆ Awake()

override void BrokeProtocol.Managers.SceneManager.Awake ( )
inlineprotectedvirtual

◆ Clear()

void BrokeProtocol.Managers.SceneManager.Clear ( )
inline

◆ ClonePlace() [1/2]

Place BrokeProtocol.Managers.SceneManager.ClonePlace ( Place place)

◆ ClonePlace() [2/2]

Place BrokeProtocol.Managers.SceneManager.ClonePlace ( Place place,
int copyIndex,
int offset )
inline

◆ CustomEnvironment()

void BrokeProtocol.Managers.SceneManager.CustomEnvironment ( )
inline

◆ DeserializeLevel()

void BrokeProtocol.Managers.SceneManager.DeserializeLevel ( List< BaseParameters > parameters)
inline

◆ DestroyPlace()

void BrokeProtocol.Managers.SceneManager.DestroyPlace ( Place place)
inline

◆ Duplicate()

bool BrokeProtocol.Managers.SceneManager.Duplicate ( Transform originalT,
out Transform duplicateT )
inline

◆ EnvironmentData()

object[] BrokeProtocol.Managers.SceneManager.EnvironmentData ( )

◆ FinishCustomAssets()

void BrokeProtocol.Managers.SceneManager.FinishCustomAssets ( )
inline

◆ GetAssetData()

Dictionary< string, AssetData > BrokeProtocol.Managers.SceneManager.GetAssetData ( RuntimePlatform platform)

◆ GetEntity() [1/2]

ShEntity BrokeProtocol.Managers.SceneManager.GetEntity ( int index)

◆ GetEntity() [2/2]

ShEntity BrokeProtocol.Managers.SceneManager.GetEntity ( string name)

◆ GetEntity< T >() [1/2]

Type Constraints
T :ShEntity 

◆ GetEntity< T >() [2/2]

Type Constraints
T :ShEntity 

◆ GetIntersectionColor()

LightColor BrokeProtocol.Managers.SceneManager.GetIntersectionColor ( int direction)
inline

◆ GetPlace()

Place BrokeProtocol.Managers.SceneManager.GetPlace ( Transform t)

◆ GetPrefab()

GameObject BrokeProtocol.Managers.SceneManager.GetPrefab ( string path)

◆ GetSnapshot()

void BrokeProtocol.Managers.SceneManager.GetSnapshot ( GameObject g,
RawImage image )
inline

◆ IgnoreCollision()

bool BrokeProtocol.Managers.SceneManager.IgnoreCollision ( Collider collider)

◆ IncrementTransferProgress()

void BrokeProtocol.Managers.SceneManager.IncrementTransferProgress ( int length)
inline

◆ InstantiateEditor()

GameObject BrokeProtocol.Managers.SceneManager.InstantiateEditor ( GameObject original,
int placeIndex,
Vector3 position,
Quaternion rotation )
inline

◆ IsIntersectionBlocked()

bool BrokeProtocol.Managers.SceneManager.IsIntersectionBlocked ( int direction)

◆ LoadAssetBundles()

void BrokeProtocol.Managers.SceneManager.LoadAssetBundles ( )
inline

◆ PlaceItemCount()

static int BrokeProtocol.Managers.SceneManager.PlaceItemCount ( Place place)
inlinestatic

◆ ProcessMap()

void BrokeProtocol.Managers.SceneManager.ProcessMap ( )
inline

◆ ReadLevel()

IEnumerator BrokeProtocol.Managers.SceneManager.ReadLevel ( string path,
MyCallback postProcess )
inline

◆ RegisterAssetBundle() [1/2]

string BrokeProtocol.Managers.SceneManager.RegisterAssetBundle ( byte[] asset,
bool load )
inline

◆ RegisterAssetBundle() [2/2]

string BrokeProtocol.Managers.SceneManager.RegisterAssetBundle ( string path,
bool load,
out byte[] data )
inline

◆ ReloadGame()

void BrokeProtocol.Managers.SceneManager.ReloadGame ( uint disconnectType)
inline

◆ ResetLoadingWindow()

void BrokeProtocol.Managers.SceneManager.ResetLoadingWindow ( int loadTotal)
inline

◆ SaveLevel()

void BrokeProtocol.Managers.SceneManager.SaveLevel ( string path,
bool checkSave )
inline

◆ SerializeLevel()

List< BaseParameters > BrokeProtocol.Managers.SceneManager.SerializeLevel ( bool checkSave)
inline

◆ SetMinPlaces()

void BrokeProtocol.Managers.SceneManager.SetMinPlaces ( int index)
inline

◆ SetPlace()

void BrokeProtocol.Managers.SceneManager.SetPlace ( int placeIndex)
inline

◆ ShowLoadingWindow()

void BrokeProtocol.Managers.SceneManager.ShowLoadingWindow ( )
inline

◆ TryGetEntity() [1/2]

bool BrokeProtocol.Managers.SceneManager.TryGetEntity ( int index,
out ShEntity entity )

◆ TryGetEntity() [2/2]

bool BrokeProtocol.Managers.SceneManager.TryGetEntity ( string name,
out ShEntity entity )

◆ TryGetEntity< T >() [1/2]

bool BrokeProtocol.Managers.SceneManager.TryGetEntity< T > ( int index,
out T entity )
inline
Type Constraints
T :ShEntity 

◆ TryGetEntity< T >() [2/2]

bool BrokeProtocol.Managers.SceneManager.TryGetEntity< T > ( string name,
out T entity )
inline
Type Constraints
T :ShEntity 

◆ UpdateActiveVisibility()

void BrokeProtocol.Managers.SceneManager.UpdateActiveVisibility ( )
inline

◆ WaterLevel()

float BrokeProtocol.Managers.SceneManager.WaterLevel ( Vector3 position)
inline

Member Data Documentation

◆ androidAssetFiles

Dictionary<string, AssetData> BrokeProtocol.Managers.SceneManager.androidAssetFiles = new()

◆ assetCacheExists

byte [] BrokeProtocol.Managers.SceneManager.assetCacheExists

◆ assetFiles

Dictionary<string, AssetData> BrokeProtocol.Managers.SceneManager.assetFiles = new()

◆ childActionPairs

List<ChildIndexActionPair> BrokeProtocol.Managers.SceneManager.childActionPairs = new()

◆ cloudColor

Color BrokeProtocol.Managers.SceneManager.cloudColor = new(1f, 0.3f, 0.3f)

◆ cloudFraction

float BrokeProtocol.Managers.SceneManager.cloudFraction

◆ cloudHeight

float BrokeProtocol.Managers.SceneManager.cloudHeight = 140f

◆ consumablesCollection

Dictionary<int, ShConsumable> BrokeProtocol.Managers.SceneManager.consumablesCollection = new()

◆ curCloudColor

Color BrokeProtocol.Managers.SceneManager.curCloudColor

◆ curCloudHeight

float BrokeProtocol.Managers.SceneManager.curCloudHeight

◆ currentPlace

int BrokeProtocol.Managers.SceneManager.currentPlace

◆ curSkyColor

Color BrokeProtocol.Managers.SceneManager.curSkyColor

◆ curWaterColor

Color BrokeProtocol.Managers.SceneManager.curWaterColor

◆ customObjects

Dictionary<int, GameObject> BrokeProtocol.Managers.SceneManager.customObjects = new()

◆ customSnapshots

Dictionary<int, Texture2D> BrokeProtocol.Managers.SceneManager.customSnapshots = new()

◆ customUIs

Dictionary<string, VisualTreeAsset> BrokeProtocol.Managers.SceneManager.customUIs = new()

◆ dayFraction

float BrokeProtocol.Managers.SceneManager.dayFraction

◆ dayLength

float BrokeProtocol.Managers.SceneManager.dayLength = defaultDayLength

◆ defaultDayLength

const float BrokeProtocol.Managers.SceneManager.defaultDayLength = 1440f
static

◆ defaultEnvironment

bool BrokeProtocol.Managers.SceneManager.defaultEnvironment = true

◆ entityCollection

Dictionary<int, ShEntity> BrokeProtocol.Managers.SceneManager.entityCollection = new()

◆ entityData

byte [] BrokeProtocol.Managers.SceneManager.entityData

◆ forceGizmos

bool BrokeProtocol.Managers.SceneManager.forceGizmos = false

◆ furnitureCollection

Dictionary<int, ShFurniture> BrokeProtocol.Managers.SceneManager.furnitureCollection = new()

◆ gameStarted

bool BrokeProtocol.Managers.SceneManager.gameStarted

◆ healerCollection

Dictionary<int, ShConsumable> BrokeProtocol.Managers.SceneManager.healerCollection = new()

◆ isBuilder

bool BrokeProtocol.Managers.SceneManager.isBuilder

◆ isClient

bool BrokeProtocol.Managers.SceneManager.isClient

◆ isServer

bool BrokeProtocol.Managers.SceneManager.isServer

◆ lastSaveTime

float BrokeProtocol.Managers.SceneManager.lastSaveTime

◆ layerTypes

LayerType [] BrokeProtocol.Managers.SceneManager.layerTypes
Initial value:
= new[]
{
new LayerType(typeof(ShEntity), "Entity"),
new LayerType(typeof(ShTerritory), "Territory"),
new LayerType(typeof(MapMarker), "MapMarker"),
new LayerType(typeof(Waypoint), "Waypoint"),
new LayerType(typeof(Destructible), "Destructible"),
new LayerType(null, "Static Map Objects")
}

◆ loadingRect

RectTransform BrokeProtocol.Managers.SceneManager.loadingRect

◆ loadingWindow

LoadingWindow BrokeProtocol.Managers.SceneManager.loadingWindow

◆ loadProgress

int BrokeProtocol.Managers.SceneManager.loadProgress

◆ loadTotal

int BrokeProtocol.Managers.SceneManager.loadTotal

◆ mapCacheExists

bool BrokeProtocol.Managers.SceneManager.mapCacheExists

◆ mapData

byte [] BrokeProtocol.Managers.SceneManager.mapData

◆ mapHash

string BrokeProtocol.Managers.SceneManager.mapHash

◆ mTransform

Transform BrokeProtocol.Managers.SceneManager.mTransform

◆ places

List<Place> BrokeProtocol.Managers.SceneManager.places = new()

◆ prefabCollection

Dictionary<int, string> BrokeProtocol.Managers.SceneManager.prefabCollection = new()

◆ referenceTime

float BrokeProtocol.Managers.SceneManager.referenceTime

◆ skyColor

Color BrokeProtocol.Managers.SceneManager.skyColor = new(1f, 0.6f, 0.5f)

◆ time

float BrokeProtocol.Managers.SceneManager.time

◆ uiRect

RectTransform BrokeProtocol.Managers.SceneManager.uiRect

◆ waterColor

Color BrokeProtocol.Managers.SceneManager.waterColor = new(0.2f, 0.9f, 1f)

◆ waterMaxZ

const float BrokeProtocol.Managers.SceneManager.waterMaxZ = 5f
static

◆ waterMinZ

const float BrokeProtocol.Managers.SceneManager.waterMinZ = -6f
static

◆ weatherFraction

float BrokeProtocol.Managers.SceneManager.weatherFraction

◆ worldBounds

Bounds BrokeProtocol.Managers.SceneManager.worldBounds

Property Documentation

◆ ExteriorPlace

Place BrokeProtocol.Managers.SceneManager.ExteriorPlace
get

◆ ExteriorT

Transform BrokeProtocol.Managers.SceneManager.ExteriorT
get

◆ GetMapCachePath

string BrokeProtocol.Managers.SceneManager.GetMapCachePath
get

◆ LoadedFraction

float BrokeProtocol.Managers.SceneManager.LoadedFraction
get

◆ ServerRunning

bool BrokeProtocol.Managers.SceneManager.ServerRunning
get

◆ ShowCursor

bool BrokeProtocol.Managers.SceneManager.ShowCursor
getset

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