Exemplo n.º 1
0
    // Use this for initialization
    /// <summary>
    /// Starts this instance.
    /// </summary>
    void Start()
    {
        Application.runInBackground = true;

        GetGameInitInfo();
        enemies = new ArrayList();
        spawners = new ArrayList();
        teamSpawners[0] = new ArrayList();
        teamSpawners[1] = new ArrayList();

        gameTime.setTime(0.0f);
        timer = 0;
        rounds.notParsed = true;
        resourceText.text = money.ToString();
        healthText.text = health.ToString();
        opponentHealth = health;
        opponentHealthText.text = opponentHealth.ToString();

        TMXLoader tmxl = new TMXLoader(Resources.Load<TextAsset>("map2"), this, teamId);
        tmxl.loadMeta();
        _mapWidth = tmxl.realMapWidth;
        _mapHeight = tmxl.realMapHeight;
        map = tmxl.tiles;
        tmxl.load();

        GameObject.FindWithTag("MainCamera").transform.position += tmxl.TransformVector;
        GameObject.FindWithTag("MainCamera").GetComponent<CameraAI>().SetMapSize(_mapWidth * 0.32f, _mapHeight * 0.32f);

        StartNetworking();
    }
    // Use this for initialization
    void Start()
    {
        enemies = new ArrayList();
        spawners = new ArrayList();
        gameTime.setTime(10.0f);
        timer = 0;
        rounds.notParsed = true;

        TMXLoader tmxl = new TMXLoader(Resources.Load<TextAsset>("coolmap2"), this);
        tmxl.loadMeta();
        _mapWidth = tmxl.mapWidth;
        _mapHeight = tmxl.mapHeight;
        map = tmxl.tiles;
        tmxl.load();
    }