Elin Decompiled Documentation EA 23.346 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 void ToggleDoor(bool sound = true, bool refresh = true)
6 {
7 base.ToggleDoor(sound, refresh);
8 TraitDoorBig doorPair = GetDoorPair();
9 if (doorPair != null && doorPair.IsOpen() != IsOpen())
10 {
11 doorPair.ToggleDoor(sound: false);
12 }
13 }
14
16 {
17 int dir = owner.dir;
18 Cell cell = null;
19 cell = ((!(this is TraitDoorBigL)) ? ((dir == 0 || dir == 2) ? owner.Cell.Back : owner.Cell.Left) : ((dir == 0 || dir == 2) ? owner.Cell.Front : owner.Cell.Right));
20 return cell.traitDoor as TraitDoorBig;
21 }
22}
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:15
override int height
Definition: TraitDoorBig.cs:3
override void ToggleDoor(bool sound=true, bool refresh=true)
Definition: TraitDoorBig.cs:5
virtual bool IsOpen()
Definition: TraitDoor.cs:101
Card owner
Definition: Trait.cs:28