void Awake() { //Anim = GetComponent<Animator> (); hud = gameController.GetComponent <HUDcontroller>(); hud.SetHealth(Health / 100); game = gameController.GetComponent <GameController> (); }
void Awake() { hud = gameController.GetComponent <HUDcontroller>(); hud.SetBullets(Bullets); hud.SetScore(0); timerBetweenShots = TimeBetweenShots; }
void Start() { hud = GameObject.Find("HUD").GetComponent <HUDcontroller>(); Physics.IgnoreLayerCollision(11, 5); //Grabbable objects and the UI will not collide Physics.IgnoreLayerCollision(14, 15); //Hoomans and Resources food.Init(); wood.Init(); stone.Init(); }
void Start() { _corpoRigido = GetComponent <Rigidbody2D>(); _movimentacaoUtils = new MovimentacaoUtils(); _boardUtils = new KeyBoardUtils(); _listCorpo = new List <GameObject>(); InvokeRepeating("CorpoMoveLogic", timeMovieCorpo, repeateRate); _coliderCorpoController = GetComponentInChildren <ColiderCorpoController>(); _huDcontroller = GameObject.Find("HUDController").GetComponent <HUDcontroller>(); _huDcontroller.setHudState("Snake Bug", "0"); soundEmmiter = GetComponent <AudioSource>(); }
IEnumerator LoadScene(int level) { Debug.Log("Loading level " + level.ToString()); /*AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(0); * while (!asyncLoad.isDone) * yield return null;*/ HUDcontroller hud = GameObject.Find("ViveCurvePointers").GetComponent <SmashController>().hud; string msg = ""; string dots = ""; float nextDots = Time.time + .5f; switch (level) { case -1: msg = "Quitting"; break; case 1: msg = "Loading Tutorial"; break; case 2: msg = "Loading Survival Mode"; break; default: msg = "The developers really screwed up, and are trying to load the wrong level\nLOL"; break; } Debug.Log(msg); AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(level); while (!asyncLoad.isDone) { if (Time.time > nextDots) { nextDots = Time.time + .5f; dots += "."; if (dots == "...") { dots = ""; } } hud.SendMsg(msg + dots, 0.5f, Color.black); yield return(null); } }
IEnumerator LoadingBar(int level) { HUDcontroller hud = GameObject.Find("ViveCurvePointers").GetComponent <SmashController>().hud; string msg = ""; string dots = ""; float nextDots = Time.time + .5f; switch (level) { case -1: msg = "Quitting"; break; case 1: msg = "Loading Tutorial"; break; case 2: msg = "Loading Survival Mode"; break; default: msg = "The developers really screwed up, and are trying to load the wrong level\nLOL"; break; } while (true) { if (Time.time > nextDots) { nextDots = Time.time + .5f; dots += "."; if (dots == "...") { dots = ""; } } hud.SendMsg(msg + dots, 0.5f, Color.black); yield return(null); } }
void Awake() { hud = gameController.GetComponent <HUDcontroller>(); Drop = GetComponent <DroppedObject> (); anim = GetComponent <EnemyAnimController> (); }