Exemplo n.º 1
0
 void Start()
 {
     Debug.Log("This Collider2D can be triggered");
     gameManager = GameObject.FindGameObjectWithTag("GameController");
     typGry      = gameManager.GetComponent <GameManager>().typGry;
     player      = GameObject.FindGameObjectWithTag("Player");
 }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        gameManager = GameObject.FindGameObjectWithTag("GameController");
        typGry      = gameManager.GetComponent <GameManager>().typGry;

        if (typGry == GameManager.typeOfGame.multi)
        {
            player = GameObject.FindGameObjectWithTag("PlayerMulti");
        }
        else
        {
            player = GameObject.FindGameObjectWithTag("Player");
        }

        health = GameObject.Find("GUI/Canvas/Health/Value").GetComponent <Text> ();
        armor  = GameObject.Find("GUI/Canvas/Armor/Value").GetComponent <Text> ();
        ammo   = GameObject.Find("GUI/Canvas/Ammo/Value").GetComponent <Text> ();
    }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     gameManager = GameObject.FindGameObjectWithTag("GameController");
     typGry      = gameManager.GetComponent <GameManager>().typGry;
     player      = GameObject.FindGameObjectWithTag("Player");
 }