예제 #1
0
 public override void Awake()
 {
     base.Awake();
     playItem  = new List <DivinationItemView>();
     allItem   = new List <DivinationItemView>();
     playImage = hexagon_trf.GetComponentsInChildren <Image>();
     for (int i = 1; i < playImage.Length; i++)
     {
         Image image = playImage[i];
         int   index = i;
         EventListener.Get(image.gameObject).OnClick = e =>
         {
             if (index <= playItem.Count)
             {
                 playItem[index - 1].SetAlpha(0);
                 for (int j = 1; j < playItem[index - 1].data.Level; j++)
                 {
                     playExp -= playItem[index - 1].data.LevelUpExp(j);
                 }
                 playExp -= playItem[index - 1].data.Exp;
                 playExp -= playItem[index - 1].data.TotemConfig.Exp;
                 playItem.RemoveAt(index - 1);
                 SetPlayView();
                 ExpValue();
             }
         };
     }
     playText = hexagon_trf.GetComponentsInChildren <Text>();
     particle = particlemain_trf.GetComponentInChildren <ParticleItem>();
     particle.Stop();
     childparticle = particle_trf.GetComponentsInChildren <ParticleItem>();
     for (int i = 0; i < childparticle.Length; i++)
     {
         childparticle[i].Stop();
     }
 }