Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        _player   = GameObject.Find("Player").GetComponent <Player>();
        _trap     = GetComponent <TrapManager>();
        _pathInfo = GetComponent <ShowPath>();

        GameTimer  = (int)(_pathInfo.GetCorrectTilesCount() * 3.5f);
        GameTimer -= 0.01f;
    }
    // Use this for initialization
    void Start()
    {
        _pathManager       = GameObject.Find("boardGameManager").GetComponent <ShowPath>();
        _canvas            = gameObject.GetComponent <Canvas>();
        _canvas.renderMode = RenderMode.ScreenSpaceCamera;
        _listCount         = _pathManager.GetCorrectTilesCount();
        _totalAnimTime     = _listCount * _pathManager.GetDisplayAnimTime();

        LoadingText.text    = "initialising ...";
        ProgressText.text   = "";
        PercentageText.text = "0.00";

        _blackTex = new Texture2D(1, 1);
        _blackTex.SetPixel(0, 0, new Color(0, 0, 0, 0));
        _blackTex.Apply();
    }