예제 #1
0
        // ------------------ Methods

        override protected void Awake()
        {
            base.Awake();
            Debug.Log("GameController.Awake()");


            GameController.OnDestroying += GameController_OnDestroying;
            TickController.Instantiate();
            AudioController.Instantiate();
            InputController.Instantiate();
            ViewController.Instantiate();
            ResourceController.Instantiate();

            Application.targetFrameRate = 30;
            _screenBounds = UnityEngineReplacementUtility.Convert(GameUtility.GetOrthographicBounds(Camera.main));


            SetupPools();
            SetupPoolObserver();

            //order matters
            //1 - Systems that depend on entities will internally listen for entity creation before reacting - nice!
            SetupSystems();

            //2
            SetupEntities();

            //place a ball in the middle of the screen w/ velocity
            _pool.CreateEntity().willStartNextRound = true;
        }
예제 #2
0
        // ------------------ Methods

        override protected void Awake()
        {
            base.Awake();
            Debug.Log("GameController.Awake()");


            AudioController.Instantiate();
            InputController.Instantiate();
            ResourceController.Instantiate();
            TickController.Instantiate();
            ViewController.Instantiate();
            GameController.OnDestroying += GameController_OnDestroying;


            Application.targetFrameRate = 30;

            SetupPools();
            SetupPoolObserver();

            //order matters
            //1 - Systems that depend on entities will internally listen for entity creation before reacting - nice!
            SetupSystems();

            //2
            SetupEntities();
        }