Exemplo n.º 1
0
    private int typesOfObjects = 3; // 0 is Good, 1 is Bad, 2 is Obstacle

    void Start()
    {
        mapGenerator       = GameObject.FindGameObjectWithTag("MapGenerator").GetComponent <MapGenerator>();
        gameManager        = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>();
        player             = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMotor>();
        playerRunningSpeed = player.GetRunningSpeed();

        mapTileLength = mapGenerator.TileLength();

        initialTilesTotalLength = mapTileLength * mapGenerator.AmountOfTiles();

        SpawnInitialItems();
    }