Beispiel #1
0
        // rewrite
        private IEnumerator RemoveOpponentTargetingArrow(OpponentBoardArrow arrow, Action action)
        {
            yield return(new WaitForSeconds(1f));

            arrow.Dispose();
            Object.Destroy(arrow.gameObject);

            action?.Invoke();
        }
Beispiel #2
0
        // rewrite
        private OpponentBoardArrow CreateOpponentTarget(
            bool createTargetArrow, bool isReverseArrow, GameObject startObj, object target, Action action)
        {
            if (!createTargetArrow)
            {
                action?.Invoke();
                return(null);
            }

            OpponentBoardArrow targetingArrow =
                Object.Instantiate(_fightTargetingArrowPrefab).AddComponent <OpponentBoardArrow>();

            targetingArrow.Begin(startObj.transform.position);

            targetingArrow.SetTarget(target);

            MainApp.Instance.StartCoroutine(RemoveOpponentTargetingArrow(targetingArrow, action));

            return(targetingArrow);
        }