public void SlotSpellCast() { if (spellState) { PlayerSpellCaster caster = playerSpell.playerSpellCaster; caster.othersTrigger.DoThat(); caster.mainTrigger.DoThat(); spellState = false; } }
void Awake() { GlobalVariables.player = this; GlobalVariables.entityList.Add(this.gameObject); cHealth = GetComponent <Health>(); cTPCamera = GetComponent <ThirdPersonCamera>(); cMovement = GetComponent <PlayerMovement>(); cCharacter = GetComponent <CharacterController>(); cSpellCaster = GetComponent <PlayerSpellCaster>(); }
void FixedUpdate() { //DisplayUI spellCaster = GameObject.FindGameObjectWithTag("SpellCaster").GetComponent <PlayerSpellCaster>(); _DevelopmentScore.SetText("Development Score: " + ControlFactors.DEVELOPMENT_SCORE.ToString()); _Love.SetText("Love: " + ((ControlFactors.LOVE / ControlFactors.EMOTION) * 100f).ToString("F0") + "%"); _Fear.SetText("Fear: " + ((ControlFactors.FEAR / ControlFactors.EMOTION) * 100f).ToString("F0") + "%"); _EnergySlider.value = ((ControlFactors.ENERGY % ControlFactors.MAX_ENERGY) / ControlFactors.MAX_ENERGY); _EnergyCharges.SetText(((int)ControlFactors.ENERGY / (int)ControlFactors.MAX_ENERGY).ToString("F0")); _EmotionBar.value = (ControlFactors.LOVE / ControlFactors.EMOTION); _Time.SetText("Time: " + getTimeInHours()); _MaxEnergy.SetText("x " + ControlFactors.MAX_ENERGY.ToString("F0")); // Checks if the Good Spell Queue needs to be updated if (spellCaster.spellQueue.Count > queuedSpellButtons.Count && queuedSpellButtons.Count < queueItemsShown) { addToQueue(); } }
void Start() { spellCaster = Player.instance.GetComponent <PlayerSpellCaster>(); }