/// <summary> Called when the second card is selected and is a match. Call in MemoryGameManager.cs </summary> public void FlipCard() { // Calls the flip event. if (FlipEvent != null) { FlipEvent.Invoke(); } isMatched = true; }
private void OnClick(TouchWrapper wrapper, bool isOverGameObjects) { var touch = wrapper.GetTouch(); if (touch.phase != TouchPhase.Began || IsBlocked || !_canFlip) { return; } _canFlip = false; Invoke(nameof(AllowFlipping), FlipInterruption); FlipEvent?.Invoke(); }
public void Flip() { FlipEvent?.Invoke(); }
// calls the specified flip event with args, or generates the current ones if needed private void CallFlipEvent(FlipEvent evt, FlipEventArgs args = null) { evt?.Invoke(args ?? CurrentArgs); }