|
Broke Protocol Game API Reference
1.39
Code reference for server and client scripting
|
Public Member Functions | |
| Bounds | GetWorldBounds () |
| virtual void | CleanUp () |
| virtual void | Restore (Vector3 position, Quaternion rotation, Transform placeT) |
| override void | CheckSave () |
| float | GetLocalY (Vector3 worldPosition) |
| float | GetFlatAngle (Vector3 v) |
| virtual bool | InActionRange (ShEntity e) |
| bool | CanSeeEntity (ShEntity other, bool checkInFront=false, float viewRange=Util.visibleRange) |
| bool | GetOverlapEntity< T > (Vector3 position, Quaternion rotation, int maskIndex, float extentsMultiplier, Predicate< T > predicate, out T entity) |
| bool | CanSpawn (Vector3 position, Quaternion rotation, ShEntity[] ignoreArray) |
| bool | CanSee (Vector3 position) |
| float | Distance (ShEntity other) |
| float | DistanceSqr (ShEntity other) |
| float | DistanceSqr2D (ShEntity other) |
| float | DistanceSqr2D (Vector3 other) |
| float | Distance (Vector3 other) |
| float | DistanceSqr (Vector3 other) |
| virtual void | DestroyExtras () |
| void | SetParent (Transform parent) |
| void | SetPosition (Vector3 position) |
| virtual void | SetRotation (Quaternion rotation) |
| void | SetPositionSafe (Vector3 targetPosition) |
| virtual void | Destroy () |
| virtual void | PreInitialize (int ID) |
| virtual void | Initialize () |
| virtual void | Spawn (Vector3 position, Quaternion rotation, Transform placeT) |
| void | DeactivateEntity () |
| void | IgnoreCollision (ShPlayer p, bool ignore) |
| IEnumerator | ResetCollisions (ShPlayer p) |
| virtual void | SetTransform (Vector3 position, Quaternion rotation, bool zeroVelocity) |
| int | InventoryValue () |
| int | GetMyItemValue (ShItem item, bool markup) |
| void | SendViewerDelta (byte delta, int itemIndex, int amount, ShPlayer ignorePlayer) |
| void | TransferMoney (byte deltaType, int amount=1, bool dispatch=true) |
| void | TransferItem (byte deltaType, ShItem item, int amount=1, bool dispatch=true) |
| bool | ValidTransfer (int itemIndex, int amount) |
| virtual void | TransferItem (byte deltaType, int itemIndex, int amount=1, bool dispatch=true) |
| byte[] | SerializeMyItems () |
| SizedArray | SerializeShop () |
| void | DeserializeMyItems (byte[] inventoryArray) |
| void | DeserializeShop (byte[] inventoryArray) |
| virtual void | AddToMyItems (int itemIndex, int amount, bool dispatch) |
| void | AddToTradeItems (int itemIndex, int amount) |
| virtual void | RemoveFromMyItems (int itemIndex, int amount, bool dispatch) |
| void | RemoveFromTradeItems (int itemIndex, int amount) |
| virtual bool | CanBeSearched (ShPlayer p) |
| bool | CanBeCracked (ShPlayer p) |
| int | ItemCount (Dictionary< int, InventoryItem > inventory, int itemIndex) |
| bool | HasItem (ShItem item) |
| bool | HasItem (int itemIndex) |
| int | MyItemCount (ShEntity item) |
| int | TradeItemCount (ShEntity item) |
| int | MyItemCount (int itemIndex) |
| int | TradeItemCount (int itemIndex) |
| void | ClearAllViewers () |
| void | RemoveViewer (ShPlayer viewer) |
| bool | ShopCanBuy (ShItem item) |
Public Member Functions inherited from BrokeProtocol.Entities.Serialized | |
| virtual void | InitializeEditor () |
| virtual void | BoundsHighlightAdd () |
| virtual void | BoundsHighlightRemove () |
| void | Trigger (Collider collider, string eventName, bool enter) |
Public Attributes | |
| ClEntity | clEntity |
| SvEntity | svEntity |
| Animator | animator |
| bool | syncAnimator |
| ShPlayer | controller |
| Dictionary< string, string > | dynamicActions = new () |
| bool | isHuman |
| float | videoStartTime |
| string | profile = string.Empty |
| bool | isWorldEntity |
| Renderer[] | renderers |
| AppIndex[] | availableApps |
| InventoryType | inventoryType |
| Dictionary< int, InventoryItem > | myItems = new () |
| Dictionary< int, InventoryItem > | tradeItems = new () |
| HashSet< ShPlayer > | viewers = new () |
| HashSet< Collider > | colliders |
| int | ID |
| int | index |
| ShManager | manager |
| int | value |
| int | respawnFrame |
| Vector3 | relativeVelocity |
| Bounds | bounds |
Public Attributes inherited from BrokeProtocol.Entities.Serialized | |
| string | referencePrefab |
| GameObject | go |
| Transform | mainT |
| string | data |
| BoundsHighlight | highlight |
Protected Member Functions | |
| virtual void | UpdateMainColliders () |
| InventoryItem | DeserializeItem (byte[] itemArray) |
| InventoryItem | DeserializeShopItem (byte[] itemArray) |
| void | AddToInventory (Dictionary< int, InventoryItem > inventory, int itemIndex, int amount) |
| void | RemoveFromInventory (Dictionary< int, InventoryItem > inventory, int itemIndex, int amount) |
Properties | |
| virtual bool | IsDead [get] |
| virtual bool | SyncTransform [get] |
| virtual Collider | Ground [get] |
| virtual ShEntity | SpecEntity [get] |
| bool | SpecSelf [get] |
| override SerializedParameters | Parameters [get] |
| override Type | EditorType [get] |
| virtual ShMountable | GetMount [get] |
| virtual ShPlayer | Player [get] |
| virtual Vector3 | Velocity [get, set] |
| virtual Vector3 | GetOrigin [get] |
| virtual float | MountHealth [get] |
| override bool | SendInitial [get] |
| virtual InventoryStruct[] | CollectedItems [get] |
| bool | IsClientMain [get] |
| virtual float | ProcessDuration [get] |
| Bounds | ScaledBounds [get] |
| Vector3 | CenterBounds [get] |
| bool | HasInventory [get] |
| bool | Shop [get] |
| int | MyMoneyCount [get] |
| int | TradeMoneyCount [get] |
Properties inherited from BrokeProtocol.Entities.Serialized | |
| virtual bool | SendInitial [get] |
| virtual SerializedParameters | Parameters [get] |
| virtual Type | EditorType [get] |
| ChildIndex | GetChildIndex [get] |
| virtual Transform | GetRotationT [get] |
| virtual Quaternion | GetRotation [get] |
| Transform | GetParent [get] |
| bool | IsOutside [get] |
| int | GetPlaceIndex [get] |
| Place | GetPlace [get] |
| Vector3 | GetPosition [get] |
| string | LogPosition [get] |
| virtual Vector3 | CenterBuoyancy [get] |
| virtual bool | InWater [get] |
|
inlineprotected |
|
inlinevirtual |
Reimplemented in BrokeProtocol.Entities.ShPlayer.
| void BrokeProtocol.Entities.ShEntity.AddToTradeItems | ( | int | itemIndex, |
| int | amount ) |
| bool BrokeProtocol.Entities.ShEntity.CanBeCracked | ( | ShPlayer | p | ) |
|
virtual |
Reimplemented in BrokeProtocol.Entities.ShPlayer.
|
inline |
|
inline |
| bool BrokeProtocol.Entities.ShEntity.CanSpawn | ( | Vector3 | position, |
| Quaternion | rotation, | ||
| ShEntity[] | ignoreArray ) |
|
inlinevirtual |
Reimplemented from BrokeProtocol.Entities.Serialized.
|
inlinevirtual |
Reimplemented in BrokeProtocol.Entities.ShPlayer, BrokeProtocol.Entities.ShTransport, and BrokeProtocol.Entities.ShMountable.
|
inline |
|
inline |
|
inlineprotected |
|
inline |
|
inline |
|
inlineprotected |
|
inlinevirtual |
Reimplemented in BrokeProtocol.Entities.ShPlayer, and BrokeProtocol.Entities.ShTransport.
|
inlinevirtual |
| float BrokeProtocol.Entities.ShEntity.Distance | ( | ShEntity | other | ) |
| float BrokeProtocol.Entities.ShEntity.Distance | ( | Vector3 | other | ) |
| float BrokeProtocol.Entities.ShEntity.DistanceSqr | ( | ShEntity | other | ) |
| float BrokeProtocol.Entities.ShEntity.DistanceSqr | ( | Vector3 | other | ) |
| float BrokeProtocol.Entities.ShEntity.DistanceSqr2D | ( | ShEntity | other | ) |
| float BrokeProtocol.Entities.ShEntity.DistanceSqr2D | ( | Vector3 | other | ) |
|
inline |
| float BrokeProtocol.Entities.ShEntity.GetLocalY | ( | Vector3 | worldPosition | ) |
| int BrokeProtocol.Entities.ShEntity.GetMyItemValue | ( | ShItem | item, |
| bool | markup ) |
|
inline |
| T | : | ShEntity |
|
inline |
| bool BrokeProtocol.Entities.ShEntity.HasItem | ( | int | itemIndex | ) |
| bool BrokeProtocol.Entities.ShEntity.HasItem | ( | ShItem | item | ) |
|
inline |
|
inlinevirtual |
Reimplemented in BrokeProtocol.Entities.ShPlayer.
|
inlinevirtual |
Reimplemented in BrokeProtocol.Entities.ShPlayer, BrokeProtocol.Entities.ShHelo, BrokeProtocol.Entities.ShAircraft, BrokeProtocol.Entities.ShTransport, BrokeProtocol.Entities.ShVehicle, BrokeProtocol.Entities.ShPhysical, BrokeProtocol.Entities.ShThrown, BrokeProtocol.Entities.ShAttachment, BrokeProtocol.Entities.ShLight, BrokeProtocol.Entities.ShWearable, and BrokeProtocol.Entities.ShMountable.
|
inline |
| int BrokeProtocol.Entities.ShEntity.ItemCount | ( | Dictionary< int, InventoryItem > | inventory, |
| int | itemIndex ) |
| int BrokeProtocol.Entities.ShEntity.MyItemCount | ( | int | itemIndex | ) |
| int BrokeProtocol.Entities.ShEntity.MyItemCount | ( | ShEntity | item | ) |
|
inlinevirtual |
Reimplemented in BrokeProtocol.Entities.ShPlayer, and BrokeProtocol.Entities.ShMountable.
|
inlineprotected |
|
inlinevirtual |
Reimplemented in BrokeProtocol.Entities.ShPlayer.
| void BrokeProtocol.Entities.ShEntity.RemoveFromTradeItems | ( | int | itemIndex, |
| int | amount ) |
|
inline |
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
| void BrokeProtocol.Entities.ShEntity.SetParent | ( | Transform | parent | ) |
| void BrokeProtocol.Entities.ShEntity.SetPosition | ( | Vector3 | position | ) |
|
inline |
|
virtual |
Reimplemented in BrokeProtocol.Entities.ShPlayer.
|
inlinevirtual |
Reimplemented in BrokeProtocol.Entities.ShPhysical.
|
inline |
|
inlinevirtual |
| int BrokeProtocol.Entities.ShEntity.TradeItemCount | ( | int | itemIndex | ) |
| int BrokeProtocol.Entities.ShEntity.TradeItemCount | ( | ShEntity | item | ) |
|
inlinevirtual |
Reimplemented in BrokeProtocol.Entities.ShPlayer.
| void BrokeProtocol.Entities.ShEntity.TransferItem | ( | byte | deltaType, |
| ShItem | item, | ||
| int | amount = 1, | ||
| bool | dispatch = true ) |
| void BrokeProtocol.Entities.ShEntity.TransferMoney | ( | byte | deltaType, |
| int | amount = 1, | ||
| bool | dispatch = true ) |
|
inlineprotectedvirtual |
Reimplemented in BrokeProtocol.Entities.ShPlayer.
|
inline |
| Animator BrokeProtocol.Entities.ShEntity.animator |
| AppIndex [] BrokeProtocol.Entities.ShEntity.availableApps |
| Bounds BrokeProtocol.Entities.ShEntity.bounds |
| ClEntity BrokeProtocol.Entities.ShEntity.clEntity |
| HashSet<Collider> BrokeProtocol.Entities.ShEntity.colliders |
| ShPlayer BrokeProtocol.Entities.ShEntity.controller |
| Dictionary<string, string> BrokeProtocol.Entities.ShEntity.dynamicActions = new () |
| int BrokeProtocol.Entities.ShEntity.ID |
| int BrokeProtocol.Entities.ShEntity.index |
| InventoryType BrokeProtocol.Entities.ShEntity.inventoryType |
| bool BrokeProtocol.Entities.ShEntity.isHuman |
| bool BrokeProtocol.Entities.ShEntity.isWorldEntity |
| ShManager BrokeProtocol.Entities.ShEntity.manager |
| Dictionary<int, InventoryItem> BrokeProtocol.Entities.ShEntity.myItems = new () |
| string BrokeProtocol.Entities.ShEntity.profile = string.Empty |
| Vector3 BrokeProtocol.Entities.ShEntity.relativeVelocity |
| Renderer [] BrokeProtocol.Entities.ShEntity.renderers |
| int BrokeProtocol.Entities.ShEntity.respawnFrame |
| SvEntity BrokeProtocol.Entities.ShEntity.svEntity |
| bool BrokeProtocol.Entities.ShEntity.syncAnimator |
| Dictionary<int, InventoryItem> BrokeProtocol.Entities.ShEntity.tradeItems = new () |
| int BrokeProtocol.Entities.ShEntity.value |
| float BrokeProtocol.Entities.ShEntity.videoStartTime |
| HashSet<ShPlayer> BrokeProtocol.Entities.ShEntity.viewers = new () |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
getset |