|
static Block | GetLastPlacedBlock () |
| Returns the most recently placed block. More...
|
|
static void | Init () |
|
static Block | PlaceNew (BlockIDs block, float3 position, bool autoWire=false, Player player=null) |
| Place a new block at the given position. If scaled, position means the center of the block. The default block size is 0.2 in terms of position. Place blocks next to each other to connect them. The placed block will be a complete block with a placement grid and collision which will be saved along with the game. More...
|
|
|
bool | Exists => BlockEngine.BlockExists(Id) |
| Whether the block exists. The other properties will return a default value if the block doesn't exist. If the block was just placed, then this will also return false but the properties will work correctly. More...
|
|
|
BlockGroup??????? | BlockGroup [get, set] |
| Returns the block group this block is a part of. Block groups can also be placed using blueprints. Returns null if not part of a group, although all blocks should have their own by default.
Setting the group after the block has been initialized will not update everything properly, so you can only set this property on blocks newly placed by your code.
To set it for existing blocks, you can use the Copy() method and set the property on the resulting block (and remove this block). More...
|
|
BlockColor? | Color [get, set] |
| The block's color. Returns BlockColors.Default if the block no longer exists. More...
|
|
float4 | CustomColor [get, set] |
| The block's exact color. Gets reset to the palette color (Color property) after reentering the game. More...
|
|
bool | Damageable [get, set] |
| Whether the spawned player can take damage. More...
|
|
bool? | Flipped [get, set] |
|
bool | GameOverEnabled [get, set] |
| Whether the game over screen will be displayed More...
|
|
override EGID | Id [get] |
|
string? | Label [get, set] |
| The text displayed on the block if applicable, or null. Setting it is temporary to the session, it won't be saved. More...
|
|
uint | Lives [get, set] |
| The lives the player spawns in with. More...
|
|
BlockMaterial? | Material [get, set] |
|
float3 | Position [get, set] |
| The block's current position or zero if the block no longer exists. A block is 0.2 wide by default in terms of position. More...
|
|
float3 | Rotation [get, set] |
| The block's current rotation in degrees or zero if the block doesn't exist. More...
|
|
float3 | Scale [get, set] |
| The block's non-uniform scale or zero if the block's invalid. Independent of the uniform scaling. The default scale of 1 means 0.2 in terms of position. More...
|
|
byte | Team [get, set] |
| The team id for players who spawn here. More...
|
|
BlockIDs? | Type [get] |
| The block's type (ID). Returns BlockIDs.Invalid if the block doesn't exist anymore. More...
|
|
int | UniformScale [get, set] |
| The block's uniform scale or zero if the block's invalid. Also sets the non-uniform scale. The default scale of 1 means 0.2 in terms of position. More...
|
|
◆ SpawnPoint() [1/2]
TechbloxModdingAPI.Blocks.SpawnPoint.SpawnPoint |
( |
EGID |
id | ) |
|
|
inline |
◆ SpawnPoint() [2/2]
TechbloxModdingAPI.Blocks.SpawnPoint.SpawnPoint |
( |
uint |
id | ) |
|
|
inline |
◆ Copy()
Block TechbloxModdingAPI.Block.Copy |
( |
| ) |
|
|
inlineinherited |
Creates a copy of the block in the game with the same properties, stats and wires.
- Returns
◆ Equals() [1/3]
bool TechbloxModdingAPI.Block.Equals |
( |
Block |
other | ) |
|
|
inlineinherited |
◆ Equals() [2/3]
bool TechbloxModdingAPI.Block.Equals |
( |
EGID |
other | ) |
|
|
inlineinherited |
◆ Equals() [3/3]
override bool TechbloxModdingAPI.Block.Equals |
( |
object |
obj | ) |
|
|
inlineinherited |
◆ GetConnectedCubes()
Block [] TechbloxModdingAPI.Block.GetConnectedCubes |
( |
| ) |
|
|
inlineinherited |
Returns an array of blocks that are connected to this one. Returns an empty array if the block doesn't exist.
◆ GetHashCode()
override int TechbloxModdingAPI.Block.GetHashCode |
( |
| ) |
|
|
inlineinherited |
◆ GetLastPlacedBlock()
static Block TechbloxModdingAPI.Block.GetLastPlacedBlock |
( |
| ) |
|
|
inlinestaticinherited |
Returns the most recently placed block.
- Returns
- The block object or null if doesn't exist
◆ Init()
static void TechbloxModdingAPI.Block.Init |
( |
| ) |
|
|
inlinestaticinherited |
◆ New()
static Block TechbloxModdingAPI.Block.New |
( |
EGID |
egid | ) |
|
|
inlinestaticpackageinherited |
◆ PlaceNew()
static Block TechbloxModdingAPI.Block.PlaceNew |
( |
BlockIDs |
block, |
|
|
float3 |
position, |
|
|
bool |
autoWire = false , |
|
|
Player |
player = null |
|
) |
| |
|
inlinestaticinherited |
Place a new block at the given position. If scaled, position means the center of the block. The default block size is 0.2 in terms of position. Place blocks next to each other to connect them. The placed block will be a complete block with a placement grid and collision which will be saved along with the game.
- Parameters
-
block | The block's type |
position | The block's position - default block size is 0.2 |
autoWire | Whether the block should be auto-wired (if functional) |
player | The player who placed the block |
- Returns
- The placed block or null if failed
◆ ToString()
override string TechbloxModdingAPI.Block.ToString |
( |
| ) |
|
|
inlineinherited |
◆ BlockCloneEngine
◆ BlockEngine
◆ BlockEventsEngine
◆ Exists
Whether the block exists. The other properties will return a default value if the block doesn't exist. If the block was just placed, then this will also return false but the properties will work correctly.
◆ InitData
◆ MovementEngine
◆ PlacementEngine
◆ RemovalEngine
◆ RotationEngine
◆ ScalingEngine
◆ SignalEngine
◆ BlockGroup
BlockGroup??????? TechbloxModdingAPI.Block.BlockGroup |
|
getsetinherited |
Returns the block group this block is a part of. Block groups can also be placed using blueprints. Returns null if not part of a group, although all blocks should have their own by default.
Setting the group after the block has been initialized will not update everything properly, so you can only set this property on blocks newly placed by your code.
To set it for existing blocks, you can use the Copy() method and set the property on the resulting block (and remove this block).
◆ Color
◆ CustomColor
float4 TechbloxModdingAPI.Block.CustomColor |
|
getsetinherited |
The block's exact color. Gets reset to the palette color (Color property) after reentering the game.
◆ Damageable
bool TechbloxModdingAPI.Blocks.SpawnPoint.Damageable |
|
getset |
Whether the spawned player can take damage.
◆ Flipped
bool? TechbloxModdingAPI.Block.Flipped |
|
getsetinherited |
Whether the block is flipped.
◆ GameOverEnabled
bool TechbloxModdingAPI.Blocks.SpawnPoint.GameOverEnabled |
|
getset |
Whether the game over screen will be displayed
◆ Id
override EGID TechbloxModdingAPI.Block.Id |
|
getinherited |
◆ Label
string? TechbloxModdingAPI.Block.Label |
|
getsetinherited |
The text displayed on the block if applicable, or null. Setting it is temporary to the session, it won't be saved.
◆ Lives
uint TechbloxModdingAPI.Blocks.SpawnPoint.Lives |
|
getset |
The lives the player spawns in with.
◆ Material
◆ Position
float3 TechbloxModdingAPI.Block.Position |
|
getsetinherited |
The block's current position or zero if the block no longer exists. A block is 0.2 wide by default in terms of position.
◆ Rotation
float3 TechbloxModdingAPI.Block.Rotation |
|
getsetinherited |
The block's current rotation in degrees or zero if the block doesn't exist.
◆ Scale
float3 TechbloxModdingAPI.Block.Scale |
|
getsetinherited |
The block's non-uniform scale or zero if the block's invalid. Independent of the uniform scaling. The default scale of 1 means 0.2 in terms of position.
◆ Team
byte TechbloxModdingAPI.Blocks.SpawnPoint.Team |
|
getset |
The team id for players who spawn here.
◆ Type
The block's type (ID). Returns BlockIDs.Invalid if the block doesn't exist anymore.
◆ UniformScale
int TechbloxModdingAPI.Block.UniformScale |
|
getsetinherited |
The block's uniform scale or zero if the block's invalid. Also sets the non-uniform scale. The default scale of 1 means 0.2 in terms of position.
◆ Placed
An event that fires each time a block is placed.
◆ Removed
An event that fires each time a block is removed.
The documentation for this class was generated from the following file: