예제 #1
0
        private void Fire()
        {
            for (int index = 0; index < meteorAmount; index++)
            {
                Vector2 position = (Random.insideUnitCircle * radius) + startPoint;

                SkillUI skillUIElement = ResourceUtils.AddAndGetComponent <SkillUI>(GlobalDefinitions.RESOURCE_PATH_SKILL + data.resourceID);
                skillUIElement.transform.position   = position;
                skillUIElement.transform.localScale = Vector3.one;
                skillUIElement.IgnoreCollisionMap(true);
                skillUIElement.Visible(false);
                skillUIElement.FadeIn(3.0f);
                skillUIElement.Apply(owner, data, -Mathf.PI / 6.0f);
            }
        }
예제 #2
0
        protected override IEnumerator RunProcessor()
        {
            yield return(base.RunProcessor());

            for (int index = 0; index < startPoints.Length; index++)
            {
                SkillUI skillUIElement = ResourceUtils.AddAndGetComponent <SkillUI>(GlobalDefinitions.RESOURCE_PATH_SKILL + data.resourceID);
                skillUIElement.transform.position   = startPoints[index];
                skillUIElement.transform.localScale = Vector3.one;
                skillUIElement.IgnoreCollisionMap(true);
                skillUIElement.Visible(false);
                skillUIElement.FadeIn(3.0f);
                skillUIElement.Apply(owner, data, 0);

                yield return(new WaitForSeconds(interval));
            }

            Cancel();
        }