public void OnNodeClosed(Vector3 position, List <Card> result, bool success) { nodeClosedDelegate?.Invoke(); for (int i = 0; i < resultsConfigContainer.transform.childCount; i++) { ScenarioCondition scenarioCondition = resultsConfigContainer.transform.GetChild(i).GetComponent <ScenarioCondition>(); if (scenarioCondition != null && success == scenarioCondition.checkSuccess && scenarioCondition.HandleNodeClosed(position, result)) { return; } } }
private void Start() { gift = GetComponentInChildren <ScenarioActionGiftConfig>(); cond = GetComponentInParent <ScenarioCondition>(); cond.onConditionSuccess += SpawnGift; }
private void Start() { cond = GetComponentInParent <ScenarioCondition>(); cond.checkConditionDelegate += CheckCondition; }
private void Start() { cond = GetComponentInParent <ScenarioCondition>(); cond.onConditionSuccess += SpawnNode; }