/// <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); } }); } }
public void UnRegisteBall(BallEntity ball) { BallsSet.Remove(ball); }
public void RegisteBall(BallEntity ball) { BallsSet.Add(ball); }