|
1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using Gamecraft.Damage;
- using RobocraftX.Common;
- using Svelto.ECS;
-
- namespace GamecraftModdingAPI
- {
- /// <summary>
- /// Represnts a cluster of blocks in time running mode, meaning blocks that are connected either directly or via joints.
- /// </summary>
- public class Cluster
- {
- public EGID Id { get; }
-
- public Cluster(EGID id)
- {
- Id = id;
- }
-
- public Cluster(uint id) : this(new EGID(id, CommonExclusiveGroups.SIMULATION_CLUSTERS_GROUP))
- {
- }
-
- public float InitialHealth
- {
- get => Block.BlockEngine.GetBlockInfo<HealthEntityComponent>(Id).initialHealth;
- set => Block.BlockEngine.GetBlockInfo<HealthEntityComponent>(Id).initialHealth = value;
- }
-
- public float CurrentHealth
- {
- get => Block.BlockEngine.GetBlockInfo<HealthEntityComponent>(Id).currentHealth;
- set => Block.BlockEngine.GetBlockInfo<HealthEntityComponent>(Id).currentHealth = value;
- }
-
- public float HealthMultiplier
- {
- get => Block.BlockEngine.GetBlockInfo<HealthEntityComponent>(Id).healthMultiplier;
- set => Block.BlockEngine.GetBlockInfo<HealthEntityComponent>(Id).healthMultiplier = value;
- }
- }
- }
|