Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
DetonatorElectricElement.cs
浏览该文件的文档.
1namespace Game {
3 public DetonatorElectricElement(SubsystemElectricity subsystemElectricity, CellFace cellFace) : base(subsystemElectricity, cellFace) { }
4
5 public void Detonate() {
6 CellFace cellFace = CellFaces[0];
7 int value = Terrain.MakeBlockValue(147);
8 SubsystemElectricity.Project.FindSubsystem<SubsystemExplosions>(true).TryExplodeBlock(cellFace.X, cellFace.Y, cellFace.Z, value);
9 }
10
11 public override bool Simulate() {
12 if (CalculateHighInputsCount() > 0) {
13 Detonate();
14 }
15 return false;
16 }
17
18 public override void OnHitByProjectile(CellFace cellFace, WorldItem worldItem) {
19 Detonate();
20 }
21 }
22}
DetonatorElectricElement(SubsystemElectricity subsystemElectricity, CellFace cellFace)
override void OnHitByProjectile(CellFace cellFace, WorldItem worldItem)
ReadOnlyList< CellFace > CellFaces
MountedElectricElement(SubsystemElectricity subsystemElectricity, CellFace cellFace)
static int MakeBlockValue(int contents)
virtual Subsystem FindSubsystem(Type type, string name, bool throwOnError)