// 감지영역내에 InteractiveObject가 있을 경우 반딫불을 만들어 플레이어가 어디에 있는지 알기 쉽게 해준다.
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("InteractiveObject"))
     {
         FireFlies fireFly = Instantiate(fireFliesPrefab);
         fireFly.transform.position = this.transform.position;
         fireFly.target             = other.gameObject;
     }
 }
Esempio n. 2
0
        public HyperBannerItem(ActiveItem Item, Stack <Particle> PStack)
        {
            Source = Item;

            CanvasElem = new CanvasAnimatedControl();
            CanvasElem.UseSharedDevice = true;

            Stage = new CanvasStage(CanvasElem);

            FireFliesScene = new FireFlies(PStack);
            Stage.Add(FireFliesScene);

            UpdateGrid();
        }
Esempio n. 3
0
        public void InitializeFireFlies()
        {
            string Sex = "M";

            for (int i = 0; i < FireflyCount; i++)
            {
                FireFly f = new FireFly(SwarmSpecies, Sex, interval, MaxDelay);
                f.ID = i;
                FireFlies.Add(f);

                //alternate gender
                Sex = (Sex == "M") ? "F" : "M";
            }
        }