Exemplo n.º 1
0
 /// <summary>
 /// 生成开始的小球
 /// </summary>
 private void GenerateStartBall()
 {
     if (startBall == null)
     {
         BrickMgrM.PoolModule.GetPool <BallEntity>().RentAsync()
         .Do(x =>
         {
             x.gameObject.SetActive(false);
             startBall = x;
         })
         .Delay(System.TimeSpan.FromMilliseconds(250))
         .Subscribe(x =>
         {
             x.gameObject.SetActive(true);
             if (SlidersList.Count > 0)
             {
                 x.Init(SlidersList[0].transform.position + Vector3.up * 0.5f, Vector3.zero, 0);
             }
             else
             {
                 x.Init(new Vector3(0, -16, 0) + Vector3.up * 0.5f, Vector3.zero, 0);
             }
         });
     }
 }
Exemplo n.º 2
0
 public void UnRegisteBall(BallEntity ball)
 {
     BallsSet.Remove(ball);
 }
Exemplo n.º 3
0
 public void RegisteBall(BallEntity ball)
 {
     BallsSet.Add(ball);
 }