Esempio n. 1
0
 private void TearDown()
 {
     ReplaceOnCreated.Subscribe(false);
     if (m_Systems == null)
     {
         return;
     }
     m_Systems.TearDown();
 }
Esempio n. 2
0
    // Awake is before other game objects' start calls.
    private void Awake()
    {
        TearDown();
        ReplaceOnCreated.Subscribe(true);

        // get a reference to the contexts
        var contexts = Contexts.sharedInstance;

        // create the systems by creating individual features
        m_Systems = new Feature("Systems")
                    .Add(new ClickPointInputSystem(contexts))
                    .Add(new TiltInputSystem(contexts))
                    .Add(new DrivableBodySystem(contexts))
                    .Add(new AirSupplySystem())
                    .Add(new LivingSystem(contexts));

        // call Initialize() on all of the IInitializeSystems
        m_Systems.Initialize();

        ScoreModel.GetInstance().score.value = 0;
    }