예제 #1
0
 public void UseProps(G1Block block)
 {
     this.PlayUseProp(block, Game1DataLoader.GetInstance().CurPropId, delegate
     {
         foreach (int current in Game1DataLoader.GetInstance().Use(block.Index))
         {
             if (current < this.blocks.Count)
             {
                 G1Block g = this.blocks[current];
                 if (!(g == null))
                 {
                     ParticlesControl.GetInstance().PlayExplodeEffic(g.transform.position, g.GetCurrentColor());
                     Game1DataLoader.GetInstance().FreeBlock(g.gameObject);
                 }
             }
         }
         Sequence _sequence = DOTween.Sequence();
         _sequence.AppendInterval(0.5f);
         TweenCallback _tween;
         if ((_tween = Game1Manager.FindPathClass._callback) == null)
         {
             _tween = (Game1Manager.FindPathClass._callback = new TweenCallback(Game1Manager.FindPathClass._findPathFunc.UseProps));
         }
         _sequence.AppendCallback(_tween);
     });
 }
예제 #2
0
    public void video()
    {
        Debug.Log("광고 봤음");
        bool flag = false;

        if (this.m_mask.transform.localPosition.y <= 0f)
        {
            flag = true;
        }
        if (!flag)
        {
            float num = this.m_objEndPos.transform.position.y + 0.55f;
            int   idx = 0;
            for (int i = 0; i < this.blocks.Count; i++)
            {
                G2Block g = this.blocks[i];
                if (!(g == null) && g.transform.position.y <= num)
                {
                    flag = true;
                    idx  = i;
                    break;
                }
            }
            if (!flag)
            {
                return;
            }
            foreach (int current in G2BoardGenerator.GetInstance().Use(idx, 2))
            {
                if (current < this.blocks.Count)
                {
                    G2Block g2 = this.blocks[current];
                    this.blocks[current] = null;
                    if (!(g2 == null))
                    {
                        Debug.Log("name :" + g2.transform.position + "   " + g2.GetCurrentColor());
                        ParticlesControl.GetInstance().PlayExplodeEffic(g2.transform.position, g2.GetCurrentColor());
                        G2BoardGenerator.GetInstance().FreeBlock(g2.gameObject);
                    }
                }
            }
            this.BackMap(3);
            G2BoardGenerator.GetInstance().IsStart    = true;
            G2BoardGenerator.GetInstance().IsGameOver = false;
        }
    }
예제 #3
0
    private void OnClickBlock(G1Block block)
    {
        Debug.Log("OnClickBlock " + Game1DataLoader.GetInstance().CurPropId);
        if (Game1DataLoader.GetInstance().CurPropId != 0)
        {
            this.m_dobleTotal = 0;
            ParticlesControl.GetInstance().StopChooseAllEffic();

            Game1DataLoader.GetInstance().IsPlaying = true;
            this.ControlPropsPannel(true);
            this.UseProps(block);
        }
        else
        {
            this.MoveBloodToMap(block);
        }
        this.BeginAllParticle();
    }
 private void Awake()
 {
     ParticlesControl.psControl = this;
 }