Esempio n. 1
0
 protected override void SetPrivates()
 {
     base.SetPrivates();
     PauseMenu           = Instantiator.NewPauseMenu();
     OnRootPreviousScene = Constants.SwipeScene;
     _gridBhv            = GetComponent <GridBhv>();
     _map          = MapsData.EasyMaps[Random.Range(0, MapsData.EasyMaps.Count)];
     _healthBar    = GameObject.Find("HealthBar")?.GetComponent <ResourceBarBhv>();
     _xpBar        = GameObject.Find("XpBar")?.GetComponent <ResourceBarBhv>();
     _fightTitle   = GameObject.Find("FightTitle")?.GetComponent <TMPro.TextMeshPro>();
     _orbHp        = GameObject.Find("Hp")?.GetComponent <OrbBhv>();
     _orbPa        = GameObject.Find("Pa")?.GetComponent <OrbBhv>();
     _orbPm        = GameObject.Find("Pm")?.GetComponent <OrbBhv>();
     _hidePosition = new Vector3(-10.0f, 10.0f, 0.0f);
 }
Esempio n. 2
0
 private void GetPrivates()
 {
     _instantiator = GameObject.Find(Constants.GoSceneBhvName).GetComponent <SceneBhv>().Instantiator;
     if (IsPlayer)
     {
         _orbHp = GameObject.Find("Hp")?.GetComponent <OrbBhv>();
     }
     else
     {
         _healthBar = GameObject.Find("HealthBar")?.GetComponent <ResourceBarBhv>();
     }
     _xpBar = GameObject.Find("XpBar")?.GetComponent <ResourceBarBhv>();
     _level = GameObject.Find("LevelText")?.GetComponent <TMPro.TextMeshPro>();
     _xp    = GameObject.Find("Xp")?.GetComponent <TMPro.TextMeshPro>();
     _gold  = GameObject.Find("Gold")?.GetComponent <TMPro.TextMeshPro>();
     _ressourcePopPosition = new Vector2(0.0f, -2.6f);
 }