public override void OnInspectorGUI() { base.OnInspectorGUI(); ActivationEvent cast = (ActivationEvent)target; cast.activate = EditorGUILayout.Toggle("Activate", cast.activate); }
private void Start() { if (_ability == null) { _ability = new ActivationEvent(); } _ability.AddListener(AbilitiesOn); }
/// <summary> /// Return allocated consumable units back to the /// <see cref="Consumable"/> in the event the /// <see cref="ProxyDesTaskDesTask{T}.Client"/> is canceled or the event /// that runs the <see cref="ProxyDesTaskDesTask{T}.Client"/> is canceled. /// </summary> /// <remarks> /// This method is used as a <see cref="DeferredDataCallback"/> /// delegate. The delegate is allocated by the /// <see cref="Consumable.RemoveUnits"/> method. /// </remarks> /// <param name="evt"> /// The <see cref="ActivationEvent"/> making the data request. /// </param> /// <returns>Always returns <see langword="null"/>.</returns> internal object ReturnUnits(ActivationEvent evt) { if (!evt.IsPending) { Blocker.AddUnits(_quantity); } return(null); }