public static bool TogCollides(RoomScene room, bool toggleBR, bool isOn) { if (ToggleBlock.Toggled(room, toggleBR)) { return(isOn); } return(!isOn); }
public override void Draw(RoomScene room, byte subType, int posX, int posY) { bool toggled = ToggleBlock.Toggled(room, this.toggleBR); if (toggled == isOn) { this.atlas.DrawFaceDown((ToggleBlock.Toggled(room, this.toggleBR) ? "ToggleOn" : "ToggleOff") + this.Texture, posX, posY); } else { this.atlas.DrawFaceDown((ToggleBlock.Toggled(room, this.toggleBR) ? "ToggleOn" : "ToggleOff") + this.Texture, posX - 2, posY - 2); } }
public override void Draw(RoomScene room, byte subType, int posX, int posY) { this.atlas.Draw((ToggleBlock.Toggled(room, this.toggleBR) ? "ToggleOn" : "ToggleOff") + this.Texture, posX, posY); }
public override void Draw(RoomScene room, byte subType, int posX, int posY) { this.atlas.Draw(this.Texture + (ToggleBlock.Toggled(room, this.toggleBR) ? "" : "Off") + (this.isDown ? "Down" : ""), posX, posY); }
public override void Draw(RoomScene room, byte subType, int posX, int posY) { // If Global Toggle is ON for Blue/Red, draw accordingly: this.atlas.Draw((ToggleBlock.Toggled(room, this.toggleBR) ? "ToggleOn" : "ToggleOff") + this.Texture, posX, posY); }