Esempio n. 1
0
 // Start is called before the first frame update
 private void Awake()
 {
     gameManager       = GameObject.Find("GameManager").GetComponent <GameManager>();
     gameWorld         = GameObject.Find("GameWorld").GetComponent <GameWorld>();
     boundEntity       = GetComponent <Entity>();
     grid              = GameObject.Find("GameWorld").GetComponent <PathGrid>();
     aiDirector        = gameManager.GetComponent <WorldAIDirector>();
     battleEntryScreen = GameObject.Find("BattleEntry").GetComponent <BattleEntryScript>();
 }
Esempio n. 2
0
 public void initFresh(TransformedSector sector, WorldAIDirector director, string name, int soldiers, bool needsSup)
 {
     this.director = director;
     this.sector   = sector;
     setBoundSoldiers(soldiers);
     director.addToDispatchers(gameObject);
     director.addToReceivers(gameObject);
     needSupply = needsSup;
     setName(name);
 }
Esempio n. 3
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);
    }
Esempio n. 4
0
 // Start is called before the first frame update
 void Awake()
 {
     affinityBar = transform.gameObject.GetComponentInChildren <AffinityBar>();
     director    = GameObject.Find("GameManager").GetComponent <WorldAIDirector>();
 }