Exemplo n.º 1
0
 private void OnLevelWasLoaded()
 {
     if (GameObject.Find("Player") != null)
     {
         player = GameObject.Find("Player").GetComponent <Caapora>();
     }
 }
Exemplo n.º 2
0
        public void Awake()
        {
            if (_instance == null)
            {
                DontDestroyOnLoad(this);


                _instance = this;
            }

            else
            {
                if (this != _instance)
                {
                    Destroy(gameObject);
                }
            }



            canFillBucket         = false;
            keepObjectOnLevelLoad = true;

            // Altura = GameObject.Find("Altura").GetComponent<Text>();

            CaaporaLifeBar = GameObject.Find("CaaporaStatus/life").GetComponent <Image>();

            StatusHP = GameObject.Find("CaaporaStatus/Status/hp").GetComponent <Text>();
        }
Exemplo n.º 3
0
        void Start()
        {
            PopulatePool();

            player = GameObject.Find("Player").GetComponent <Caapora>();

            if (_instance == null)
            {
                _instance = this;
                DontDestroyOnLoad(_instance);
            }
            else
            {
                if (this != _instance)
                {
                    Destroy(this.gameObject);
                }
            }
        }