protected override async Task ProcessObjectClickedAsync(R thisObject, int index) { if (ObjectClickedAsync == null) { return; } _tempSection = index; if (CanClickSingleObject() == false) { return; } int thisSection; if (IsRun() == true) { if (index == 0) { thisSection = 1; } else { thisSection = 2; } } else { thisSection = 1; } if (thisSection == 0) { throw new BasicBlankException("Section cannot be 0 for card clicked"); } SectionClicked = 0; // reset back to 0 await ObjectClickedAsync.Invoke(this, thisObject.Deck, thisSection); }
protected virtual async Task ProcessObjectClickedAsync(D thisObject, int index) { if (ObjectClickedAsync == null) { return; } await ObjectClickedAsync.Invoke(thisObject, HandList.IndexOf(thisObject)); }