Exemplo n.º 1
0
    // Start is called before the first frame update
    void Awake()
    {
        worldAI     = GameObject.Find("GameManager").GetComponent <WorldAIDirector>();
        gameManager = GameObject.Find("GameManager").GetComponent <GameManager>();
        parameters  = gameManager.gameObject.GetComponent <ParametersDDOL>();
        generator   = GetComponent <WorldGenerator>();
        totalSize   = new Vector2(tileSize.x * generator.width, tileSize.y * generator.height);
        GetComponent <BoxCollider2D>().size = new Vector2(totalSize.x, totalSize.y);
        textureAtlas = GetComponent <WorldTextureAtlas>();
        pathGrid     = GetComponent <PathGrid>();

        generator.Construct();
        textureAtlas.Construct();
        pathGrid.CreateGrid();
        worldAI.lazyInit(Resources.Load("Prefabs/enemy") as GameObject, Resources.Load("Prefabs/scannerPrefab") as GameObject);
    }
Exemplo n.º 2
0
 internal GameConnectionManager(GameLoop gameLoop, GameController controller, WorldTextureAtlas textureAtlas)
 {
     _gameLoop     = gameLoop;
     _controller   = controller;
     _textureAtlas = textureAtlas;
 }