public Receiver TryTransmit(TransmissionType t, Receiver targetReceiver) { //If we don't actually have the ability to transmit, do nothing. if (!MyActionBank.HasAction(t)) { return(null); } //If the receiver cannot receive the transmission, do nothing. if (!targetReceiver.CanReceive(t)) { return(null); } if (targetReceiver.ReceiveTransmission(t)) { MyActionBank.RemoveAction(t); } return(targetReceiver); }
public bool CanTransmit(TransmissionType t) { return(RemainingCD <= 0f && MyActionBank.HasAction(t)); }