/// <summary> /// Runs the action of escaping with an NPC character. /// </summary> /// <returns></returns> private IEnumerator EscapeCharacter() { MySpinnerData data = new MySpinnerData() { icon = tactics.stats.charData.portraitSet.small, sfx = null, text = tactics.stats.charData.entryName + " escaped!" }; yield return(StartCoroutine(spinner.ShowSpinner(data))); waitForNextAction = false; }
/// <summary> /// Runs the action of destroying the tile and showing a message to the player. /// </summary> /// <returns></returns> private IEnumerator DestroyTile() { string destroyType = (tactics.currentTile.interactType == InteractType.VILLAGE) ? "Village" : "???"; MySpinnerData data = new MySpinnerData() { icon = null, sfx = destroyedTileSfx, text = destroyType + " was destroyed!" }; yield return(StartCoroutine(spinner.ShowSpinner(data))); waitForNextAction = false; }
/// <summary> /// Displays a spinner notification with the given information. /// Locks the controls for the duration if lockGame is true. /// </summary> /// <param name="duration"></param> /// <param name="icon"></param> /// <param name="text"></param> /// <param name="lockGame"></param> public IEnumerator ShowSpinner(MySpinnerData data, float duration = 2f, bool lockGame = true) { yield return(StartCoroutine(ShowSpinner(data.icon, data.text, data.sfx, duration, lockGame))); }