Example #1
0
    // Start is called before the first frame update
    void Start()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        else
        {
            Destroy(gameObject);
        }

        source = GetComponent <AudioSource>();
        if (isThereBegVoiceAct) //if level does not have beginning voicing
        {
            StartCoroutine("BeginningVoiceActing");
        }
        currentWave = waves[wavePoint];

        bossWave = false;

        if (boss != null)
        {
            bossCode = boss.GetComponent <BossGOAP>();
        }

        currentVoice = null;

        grid = new AGrid(this.transform, gridSizeX, gridSizeY, nodeRadius, unwalkable);// set up astar dll
        grid.CreateNodes();
        pathfinding = new APathFinding();
    }