void Start() { Name = transform.GetChild(0).gameObject.GetComponent <TextMeshProUGUI>(); Health = transform.GetChild(1).gameObject.GetComponent <Simple_Bar>(); Health.transform.gameObject.SetActive(false); Name.transform.gameObject.SetActive(false); }
void Init() { if (Weapon) { RPM = transform.GetChild(0).GetComponent <Simple_Bar>(); Damage = transform.GetChild(1).GetComponent <Simple_Bar>(); MagSize = transform.GetChild(2).GetComponent <Simple_Bar>(); Recoil = transform.GetChild(3).GetComponent <Simple_Bar>(); Accuracy = transform.GetChild(4).GetComponent <Simple_Bar>(); } else { Radius = transform.GetChild(0).GetComponent <Simple_Bar>(); Damage = transform.GetChild(1).GetComponent <Simple_Bar>(); Magnitude = transform.GetChild(2).GetComponent <Simple_Bar>(); } }
void Start() { S = GameObject.FindWithTag("Ship").GetComponent <Ship>(); if (Selector == type.Bar) { B = this.gameObject.GetComponent <Simple_Bar>(); } if (Selector == type.Notification) { T = this.gameObject.GetComponent <TextMeshProUGUI>(); S.Note.TextBoxes.Add(T); } if (Selector == type.Number) { T = this.gameObject.GetComponent <TextMeshProUGUI>(); } }
void GetVars() { EnemyIndicator = this.transform.GetChild(2).gameObject; EnemyHealthBar = EnemyIndicator.transform.GetChild(0).GetComponent <Simple_Bar>(); EnemyLevel = EnemyIndicator.transform.GetChild(1).GetComponent <TextMeshProUGUI>(); EnemyName = EnemyIndicator.transform.GetChild(2).GetComponent <TextMeshProUGUI>(); XPBar = this.transform.GetChild(1).GetChild(0).GetComponent <Simple_Bar>(); HealthBar = this.transform.GetChild(1).GetChild(1).GetComponent <Simple_Bar>(); ShieldBar = this.transform.GetChild(1).GetChild(2).GetComponent <Simple_Bar>(); HealthNumber = HealthBar.transform.GetChild(3).GetChild(0).GetComponent <TextMeshProUGUI>(); ShieldNumber = ShieldBar.transform.GetChild(3).GetChild(0).GetComponent <TextMeshProUGUI>(); Level = XPBar.transform.GetChild(3).GetChild(1).GetComponent <TextMeshProUGUI>(); CurrentMoney = this.transform.GetChild(4).GetChild(1).GetComponent <TextMeshProUGUI>(); AmmoBar = this.transform.GetChild(1).GetChild(3).GetComponent <Simple_Bar>(); Ammo = AmmoBar.transform.GetChild(3).GetChild(0).GetComponent <TextMeshProUGUI>(); }
void Start() { Bar = GetComponent <Simple_Bar>(); }