public void Buffer(FirewallBuffer buffer) { buffer.Buff(); if (buffer.bufferCount.Value <= 0) { lives.Value--; } }
public void SwitchLanesLeft() { FirewallBuffer oldBuffer = currentLane.Value.buffer; HelperMethods.CyclicalDecrement(ref currentLaneIndex, NUM_LANES); currentLane.Value = lanes[currentLaneIndex]; if (HasSwitchedBuffers(oldBuffer)) { currentBuffer.Value = currentLane.Value.buffer; orbManager.RotateLeft(); } }
bool HasSwitchedBuffers(FirewallBuffer oldBuffer) { return(oldBuffer != currentLane.Value.buffer); }
public FirewallLane(FirewallBuffer buffer) { this.buffer = buffer; }