Only one action can be invoked
This commit is contained in:
parent
b0ab924037
commit
1f7a3a4595
2 changed files with 2 additions and 1 deletions
|
|
@ -49,6 +49,7 @@ namespace Actions {
|
|||
foreach (ClickActionHandler actionHandler in _clickActionHandlers) {
|
||||
if(actionHandler.Matches(gameObject, usableItem)) {
|
||||
actionHandler.InvokeAction(gameObject);
|
||||
break; // Ja Herr Professor, Sie sehen richtig. Voller Stolz verwende ich ein break.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -58,6 +59,7 @@ namespace Actions {
|
|||
foreach (NextDayActionHandler actionHandler in _nextDayActionHandlers) {
|
||||
if(actionHandler.Matches(gameObject)) {
|
||||
actionHandler.InvokeAction(gameObject);
|
||||
break; // Gleich noch einmal. Und ich kann nachts immer noch zufrieden schlafen.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ public class TileBehaviour : MonoBehaviour {
|
|||
}
|
||||
|
||||
private void NextDay() {
|
||||
Debug.Log("nextday");
|
||||
ActionManager.Instance.NextDayAction(gameObject);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue