A stable modding interface between Techblox and mods https://mod.exmods.org/
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

41 строка
1.3KB

  1. using Gamecraft.Damage;
  2. using RobocraftX.Common;
  3. using Svelto.ECS;
  4. namespace GamecraftModdingAPI
  5. {
  6. /// <summary>
  7. /// Represnts a cluster of blocks in time running mode, meaning blocks that are connected either directly or via joints.
  8. /// </summary>
  9. public class Cluster
  10. {
  11. public EGID Id { get; }
  12. public Cluster(EGID id)
  13. {
  14. Id = id;
  15. }
  16. public Cluster(uint id) : this(new EGID(id, CommonExclusiveGroups.SIMULATION_CLUSTERS_GROUP))
  17. {
  18. }
  19. public float InitialHealth
  20. {
  21. get => Block.BlockEngine.GetBlockInfo<HealthEntityComponent>(Id).initialHealth;
  22. set => Block.BlockEngine.GetBlockInfo<HealthEntityComponent>(Id).initialHealth = value;
  23. }
  24. public float CurrentHealth
  25. {
  26. get => Block.BlockEngine.GetBlockInfo<HealthEntityComponent>(Id).currentHealth;
  27. set => Block.BlockEngine.GetBlockInfo<HealthEntityComponent>(Id).currentHealth = value;
  28. }
  29. public float HealthMultiplier
  30. {
  31. get => Block.BlockEngine.GetBlockInfo<HealthEntityComponent>(Id).healthMultiplier;
  32. set => Block.BlockEngine.GetBlockInfo<HealthEntityComponent>(Id).healthMultiplier = value;
  33. }
  34. }
  35. }