Exemplo n.º 1
0
    // TODO: AI behavior for equipping weapons

    // Start is called before the first frame update
    new void Start()
    {
        base.Start();
        OnFirstScan.AddListener(ScanCells);

        gameManager = GameObject.Find("Grid Camera").GetComponent <GameManager>();

        entity = this.gameObject.GetComponent <Entity>();
        if (this.gameObject.tag == "Enemy")
        {
            enemy = this.gameObject.GetComponent <EnemyEntity>();
        }
        else if (this.gameObject.tag == "Other")
        {
            otherEntity = this.gameObject.GetComponent <OtherEntity>();
        }
    }
Exemplo n.º 2
0
    new void Start()
    {
        base.Start();
        OnFirstScan.AddListener(delegate {
            // maybe scan them every frame?
            ScanCells();

            // Set highlighted cell to first player
            if (gameManager.currentPhase == "Player")
            {
                SetSelectedCellOnPlayer(selectedPlayer);
            }
        });

        tgs.OnCellHighlight += (int cellIndex, ref bool cancelHighlight) => {
            cancelHighlight = true;
        };

        mainCamera  = this.gameObject.GetComponent <Camera>();
        inMapGUI    = mainCamera.GetComponent <InMapGUI>();
        gameManager = this.gameObject.GetComponent <GameManager>();
    }