Exemplo n.º 1
0
    private TrueSihir sihir;         //Para coletar componente.

    // Use this for initialization
    void Start()
    {
        //Inicializar um componente para coletar o componente necessario.
        GameObject s = GameObject.Find("Sihir");

        sihir = s.GetComponent <TrueSihir> ();
    }
    // Use this for initialization
    void Start()
    {
        //Os gameobjects a seguir sao inicializados para conseguir componentes de outros scripts utilizando
        //as variaveis ja declaradas.
        GameObject s = GameObject.Find ("SpellCast");
        castspell = s.GetComponent<SpellCast> ();

        esferar = GameObject.Find ("boladear2");

        GameObject t = GameObject.Find ("Sihir");
        tr = t.GetComponent<TrueSihir> ();

        GameObject h = GameObject.Find ("Sihir");
        hp = h.GetComponent<Hpsih> ();

        trsih = GameObject.Find ("Sihir");

        GameObject a = GameObject.Find ("Sihir");
        SihirSounds = a.GetComponent <SihirSounds> ();
    }
Exemplo n.º 3
0
    private TrueSihir sihir; //Para coletar componente.

    #endregion Fields

    #region Methods

    // Use this for initialization
    void Start()
    {
        //Inicializar um componente para coletar o componente necessario.
                GameObject s = GameObject.Find ("Sihir");
                sihir = s.GetComponent<TrueSihir> ();
    }