Elin Decompiled Documentation EA 23.357 Nightly
Loading...
Searching...
No Matches
TraitDoorBig.cs
Go to the documentation of this file.
1public class TraitDoorBig : TraitDoor
2{
3 public override int height => 2;
4
5 public override string idSound => GetParam(1);
6
7 public override void ToggleDoor(bool sound = true, bool refresh = true)
8 {
9 base.ToggleDoor(sound, refresh);
10 TraitDoorBig doorPair = GetDoorPair();
11 if (doorPair != null && doorPair.IsOpen() != IsOpen())
12 {
13 doorPair.ToggleDoor(sound: false);
14 }
15 }
16
18 {
19 int dir = owner.dir;
20 Cell cell = null;
21 cell = ((!(this is TraitDoorBigL)) ? ((dir == 0 || dir == 2) ? owner.Cell.Back : owner.Cell.Left) : ((dir == 0 || dir == 2) ? owner.Cell.Front : owner.Cell.Right));
22 return cell.traitDoor as TraitDoorBig;
23 }
24}
Cell Cell
Definition: Card.cs:2107
int dir
Definition: Card.cs:149
Definition: Cell.cs:7
Cell Back
Definition: Cell.cs:175
Cell Front
Definition: Cell.cs:151
Cell Left
Definition: Cell.cs:187
Cell Right
Definition: Cell.cs:163
TraitDoorBig GetDoorPair()
Definition: TraitDoorBig.cs:17
override int height
Definition: TraitDoorBig.cs:3
override string idSound
Definition: TraitDoorBig.cs:5
override void ToggleDoor(bool sound=true, bool refresh=true)
Definition: TraitDoorBig.cs:7
virtual bool IsOpen()
Definition: TraitDoor.cs:101
string GetParam(int i, string def=null)
Definition: Trait.cs:591
Card owner
Definition: Trait.cs:28