Вы не можете выбрать более 25 тем
Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
|
- using System;
-
- using RobocraftX.Blocks;
- using RobocraftX.Common;
- using Gamecraft.CharacterVulnerability;
- using Svelto.ECS;
- using Unity.Mathematics;
-
- using TechbloxModdingAPI;
- using TechbloxModdingAPI.Utility;
-
- namespace TechbloxModdingAPI.Blocks
- {
- public class SpawnPoint : Block
- {
- public SpawnPoint(EGID id) : base(id)
- {
- }
-
- public SpawnPoint(uint id) : base(new EGID(id, CommonExclusiveGroups.SPAWNPOINT_BLOCK_GROUP))
- {
- }
-
- // custom spawn point properties
-
- /// <summary>
- /// The lives the player spawns in with.
- /// </summary>
- public uint Lives
- {
- get => BlockEngine.GetBlockInfo<SpawnPointStatsEntityStruct>(this).lives;
-
- set
- {
- BlockEngine.GetBlockInfo<SpawnPointStatsEntityStruct>(this).lives = value;
- }
- }
-
- /// <summary>
- /// Whether the spawned player can take damage.
- /// </summary>
- public bool Damageable
- {
- get => BlockEngine.GetBlockInfo<SpawnPointStatsEntityStruct>(this).canTakeDamage;
-
- set
- {
- BlockEngine.GetBlockInfo<SpawnPointStatsEntityStruct>(this).canTakeDamage = value;
- }
- }
-
- /// <summary>
- /// Whether the game over screen will be displayed
- /// </summary>
- public bool GameOverEnabled
- {
- get => BlockEngine.GetBlockInfo<SpawnPointStatsEntityStruct>(this).gameOverScreen;
-
- set
- {
- BlockEngine.GetBlockInfo<SpawnPointStatsEntityStruct>(this).gameOverScreen = value;
- }
- }
-
- /// <summary>
- /// The team id for players who spawn here.
- /// </summary>
- public byte Team
- {
- get => BlockEngine.GetBlockInfo<SpawnPointIdsEntityStruct>(this).teamId;
-
- set
- {
- BlockEngine.GetBlockInfo<SpawnPointIdsEntityStruct>(this).teamId = value;
- }
- }
- }
- }
|