private static void Awake(ref Hud __instance) { if (Main.showCharacterXP.Value && _bar == null) { _bar = XPBar.Awake(__instance); } if (useCustomHud) { // Try to support QuickSlots Compatibility.QuickSlotsHotkeyBar.Unanchor(__instance); // Load custom elements, before getting positions. if (Main.useCustomHealthBar.Value) { CustomElements.HealthBar.Create(); } if (Main.useCustomStaminaBar.Value) { CustomElements.StaminaBar.Create(); } if (Main.useCustomFoodBar.Value) { CustomElements.FoodBar.Create(); } CustomHud.Load(__instance); CustomHud.PositionTemplates(); } }
private void Start() { var value = Mathf.RoundToInt(xp.RandomRange() + timeMultiplier.RandomRange() * SpeedIncreaser.Speed + elapsedMultiplier.RandomRange() * GameController.Elapsed); GetComponent <TextMeshPro>().text = $"+{value}xp"; XPBar.AddXP(value); }
private void Start() { numEnemigos = FindObjectOfType <SpawnEnemigos>(); colliderS = GetComponent <SphereCollider>(); healthBar = FindObjectOfType <HealthBar>(); expBar = FindObjectOfType <XPBar>(); playerS = FindObjectOfType <PlayerMove>(); player = GameObject.FindGameObjectWithTag("Player").transform; anim = GetComponent <Animator>(); nav = GetComponent <NavMeshAgent>(); resetEnemys = FindObjectOfType <Respawn>(); Nreina = GameObject.Find("Nreina").GetComponent <Text>(); aguaM = FindObjectOfType <AguaMagica>(); }
protected void Start() { mCurrentHP = mMaxHP; xpBar = FindObjectOfType <XPBar>(); }
private void Awake() { stats = GetComponent <Stats>(); xp = GetComponent <XPBar>(); player = GetComponent <PlayerControls>(); }