コード例 #1
0
    void StartGame()
    {
        UnityTicker tickEngine = new UnityTicker(); //note this object can be safely garbage collected

        tickEngine.Add(container.Inject(new MonsterSpawner()));
        tickEngine.Add(container.Build <UnderAttackSystem>());
    }
コード例 #2
0
    void StartGame()
    {
        //tickEngine could be added in the container as well
        //if needed to other classes!
        UnityTicker tickEngine = new UnityTicker();

        tickEngine.Add(container.Build <MonsterSpawner>());
        tickEngine.Add(container.Build <UnderAttackSystem>());
    }