/// <summary> /// Add a new Transmission to the active transmission manager /// </summary> /// <param name="transmission">transmission which should be added</param> /// <returns>true if added</returns> public virtual bool AddTransmission(TransmissionController transmission) { if (transmission == null) { throw new ArgumentNullException(); } lock (this.collectionLock) { if (this.activeTransmissions.Contains(transmission)) { return false; } transmission.PropertyChanged += this.TransmissionFinished; this.activeTransmissions.Add(transmission); } return true; }
/// <summary> /// Add a new Transmission to the active transmission manager /// </summary> /// <param name="transmission">transmission which should be added</param> /// <returns>true if added</returns> public virtual bool AddTransmission(TransmissionController transmission) { if (transmission == null) { throw new ArgumentNullException(); } lock (this.collectionLock) { if (this.activeTransmissions.Contains(transmission)) { return(false); } transmission.PropertyChanged += this.TransmissionFinished; this.activeTransmissions.Add(transmission); } return(true); }
void CheckButton(ActionEnum action, bool pressed) { if (pressed) { //GetComponent<PlayerController> ().ActivateButton (action); audio.PlayOneShot(sendSound); Action a = new Action(); a.Button = action; a.SourcePlayer = gameObject; GameObject t = Instantiate(Transmission, transform.position, Quaternion.identity); TransmissionController transmissionController = t.GetComponent <TransmissionController> (); transmissionController.TransmittedAction = a; transmissionController.color = TransmissionColor; transmissionManager.AddTransmissionController(transmissionController); } }
public TransmissionDataSource(TransmissionController controller) { Controller = controller; Controller.InsertTransmissionEvent += HandleInsertTransmissionEvent; Controller.DeleteTransmissionEvent += HandleDeleteTransmissionEvent; Controller.UpdateTransmissionEvent += HandleUpdateTransmissionEvent; }
public void AddTransmissionController(TransmissionController tc) { tc.manager = this; TransmissionControllers.Add(tc); }
public void RemoveTransmissionController(TransmissionController tc) { TransmissionControllers.Remove(tc); }