Пример #1
0
        public void Move(string id, Vector2 position, int speed = 0, EffectHolderNode observer = null)
        {
            GameObject go = GameObject.Find(id);
            Mover      m  = go.GetComponent <Mover>();

            if (m != null)
            {
                if (speed == 0)
                {
                    m.MoveInstant(position);
                }
                else
                {
                    m.MoveFreely(position, observer, data =>
                    {
                        EffectHolderNode tmp = (EffectHolderNode)data;
                        tmp.doPulse();
                        Game.Instance.ContinueEffectExecution();
                    }, null);
                }
            }
            else
            {
                ScenePositioner r = go.GetComponent <ScenePositioner>();
                r.Position = position;
            }
        }
Пример #2
0
        private IEnumerator PulseOnTimeCorrutine(EffectHolderNode effect, int time)
        {
            yield return(new WaitForSeconds(time));

            effect.doPulse();
            Interacted();
        }
Пример #3
0
        private IEnumerator PulseOnTimeCorrutine(EffectHolderNode effect, int time)
        {
            pulsing++;
            yield return(new WaitForSeconds(time));

            if (effect != null)
            {
                effect.doPulse();
            }
            pulsing--;
            Interacted();
        }
Пример #4
0
 public void PulseOnTime(EffectHolderNode effect, int time)
 {
     this.StartCoroutine(PulseOnTimeCorrutine(effect, time));
 }