Ejemplo n.º 1
0
        void Start()
        {
            playerCharacter = GameObject.FindObjectOfType <Platformer2DUserControl>();
            lives           = GameObject.FindObjectOfType <PlayerLives>();

            playerName  = GetComponentInChildren <PlayerName>();
            textCounter = GetComponentInChildren <LivesTextCounter>();
            cooldown    = 5f;
            this.transform.SetParent(null);
        }
Ejemplo n.º 2
0
        void Start()
        {
            lives      = GameObject.FindObjectOfType <PlayerLives>();
            textMeshes = GetComponentsInChildren <TextMesh>();
            foreach (TextMesh textMesh in textMeshes)
            {
                textMesh.text = lives.GetLives().ToString();
            }

            UpdateLives();
        }