public void OnShieldRecharged(Entity subject) { foreach (Status s in statuses) { s.OnShieldRecharged(subject); } shieldRecharged?.Invoke(subject); }
public void TriggerEvent(string eventName, GameObject src, EventArgs args) { BasicEvent basicEvent = GetEvent(eventName); Debug.Log("in manager, triggering event"); if (basicEvent != null) { Debug.Log("in manager, got event, triggered"); basicEvent.Invoke(src, args); } }
private void Next() { if (TryGetCardPhase(out Card card)) { _store.CurrentCard = card; _onChangeCard?.Invoke(new CardPayload( card, GetBackgroundColor(), _feedbackMap.GetSprite(card.AcceptFeedback), _feedbackMap.GetSprite(card.RejectFeedback), GetOutcome(card))); ChangeState(GameState.Card); } else { _onEndGame?.Invoke(); ChangeState(GameState.TitleScreen); } }
public bool OnDeath(Entity subject) { bool continueDeath = true; foreach (Status s in statuses) { if (!s.OnDeath(subject)) { continueDeath = false; } } if (continueDeath) { death?.Invoke(subject); return(true); } return(false); }
public void Begin() { CleanUp(); Next(); _onBeginGame?.Invoke(); }
/// <summary> /// Signal to the GameManager that the user has left-swiped on the current card. /// </summary> private void RequestReject() => _onReject?.Invoke();
/// <summary> /// Signal to the GameManager that the user has right-swiped on the current card. /// </summary> private void RequestAccept() => _onAccept?.Invoke();
/// <summary> /// Signal to the GameManager that the game should start. /// </summary> private void RequestBegin() => _begin?.Invoke();