Пример #1
0
    // Use this for initialization
    void Start()
    {
        //rb = GetComponent<Rigidbody> ();
        bar = GetComponent<ProgressBar> ();
        bar.ProgressOverTime (0, 0);
        director = Instantiate(directorPrefab, transform.position, Quaternion.identity) as GameObject;

        Color colour = GameObject.FindGameObjectWithTag ("GlobalConstant").GetComponent<ConstantData> ().playerColours [playerInput-1];
        director.transform.GetChild (0).GetComponent<Renderer> ().material.SetColor ("_Color", colour);
        director.transform.parent = transform;
    }