P
P
Pavlo Ponomarenko2018-03-28 02:35:03
C++ / C#
Pavlo Ponomarenko, 2018-03-28 02:35:03

How to register dynamic objects through Zenject (DI Container)?

Suppose we have a game, a huge number of objects are initiated at the start, but many of them are "raw", that is, they cannot work until the player presses the "Start a new game" button in the menu. Moreover, many objects depend on this game, even if it does not exist. Here's the main menu.
As soon as the game appears in the model, the buttons "save game", "continue game" appear in the main menu, and when you click on "new game", a pop-up should appear.
Since it is correct to make dependencies on objects that:
1. Can be replaced by another object of the same type
2. Can be null for the time being and this is a normal course of events

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Bashinsky, 2018-03-28
@BashkaMen

Maybe this will help solve the problem with the dependence of objects between themselves
https://ru.wikipedia.org/wiki/%D0%9D%D0%B0%D0%B1%D...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question