示例#1
0
        Friendly GetUnit()
        {
            Friendly _friendly = null;

            switch (type)
            {
            case CardType.Bassist:
                _friendly = FindObjectOfType <Bassist> ();
                break;

            case CardType.Guitarrist:
                _friendly = FindObjectOfType <Guitarrist> ();
                break;

            case CardType.Vocalist:
                _friendly = FindObjectOfType <Vocalist> ();
                break;

            case CardType.Drummer:
                _friendly = FindObjectOfType <Drummer> ();
                break;
            }

            return(_friendly);
        }
示例#2
0
        public IEnumerator Execute()
        {
            Friendly _unit = GetUnit();

            yield return(StartCoroutine(_unit.MoveForward()));


            foreach (var effect in effects)
            {
                effect.Execute(this);
            }
            yield return(new WaitForSeconds(1f));

            yield return(StartCoroutine(_unit.MoveBack()));

            Hand.Instance.Dispose(this);
            Deselect();
        }