Example #1
0
 public void Setup()
 {
     BarDamage.material = materials [0];
     puntos             = GetComponentInParent <instanciator2> ();
     puntosPlayer       = puntos.puntosScript;
     //puntos = GetComponentInParent<instaciator> ();
     //puntosPlayer = puntos.puntosScript;
 }
Example #2
0
    // Use this for initialization
    void Start()
    {
        bar.GetComponent <Renderer>().material = materials [0];
        posIniBar = bar.transform.localPosition;
        GameObject pts = GameObject.FindWithTag("puntos");

        dialPuntos   = pts.GetComponent <TextMesh> ();
        puntosPlayer = dialPuntos.GetComponent <puntosScript> ();
    }
Example #3
0
    public void Start()
    {
        BarDamage.color      = color [0];
        BarDamage.fillAmount = 1f;
        GameObject pts = GameObject.FindWithTag("puntos");

        dialPuntos   = pts.GetComponent <TextMesh> ();
        puntosPlayer = dialPuntos.GetComponent <puntosScript> ();
        oColor       = scope.color;
        scale        = scope.transform.localScale;
        if (noGameController)
        {
            StartCoroutine("gaze");
        }
    }
Example #4
0
    // Use this for initialization
    void Start()
    {
        bar       = invader.GetComponentInChildren <SpriteRenderer> ();
        bar.color = okLife;
        bar.transform.localScale = new Vector3(2f, 1f, 1f);
        GameObject pts = GameObject.FindWithTag("puntos");

        numberOfPoints        = pts.GetComponent <TextMesh> ();/*GetComponent (FindObjectOfType<TextMesh> ());*/
        animator              = GetComponent <Animator> ();
        disparar_invader      = GetComponentInChildren <controlDisparoInvader> ();
        script_numberOfPoints = numberOfPoints.GetComponent <puntosScript> ();
        int c = Random.Range(0, 7);

        GetComponentInChildren <MeshRenderer> ().material.color = colors [c];
    }