public virtual IEnumerator Tick() { if (owner is SpecialAdventurer) { tickAmountMult = 0.05f; } while (true) { yield return(tickBetweenWait); if (owner.GetState() != State.UsingStructure) { desireValue += tickAmount * tickAmountMult; } } }
IEnumerator Ticking() { float tickTimeOrigin = tickTime; float eps = 0.0001f; WaitForSeconds wait = new WaitForSeconds(tickTime); while (owner.GetState() != State.Dead) { yield return(wait); TickDesire(); if (Mathf.Abs(tickTimeOrigin - tickTime) > eps) { tickTimeOrigin = tickTime; wait = new WaitForSeconds(tickTimeOrigin); } } }
public void UpdateStat() { characterCurrentStateText.text = curCharacter.GetSuperState().ToString() + "\n" + curCharacter.GetState().ToString() + " \n" + (curCharacter.GetSuperState().Equals(SuperState.SolvingDesire) ? curCharacter.destinationPlace.names : string.Empty); characterGoldText.text = curCharacter.stat.gold.ToString(); }