Exemplo n.º 1
0
 private void ReturnToPool(BallView ball)
 {
     _activeBalls.Remove(ball);
     _pool.Add(ball);
     ball.gameObject.SetActive(false);
     SetBallSettings(ball);
     ball.Init();
 }
Exemplo n.º 2
0
    public override void Init()
    {
        base.Init();

        m_view = GetComponent <BallView>();

        m_view.Init(this);
        this.StateTransion(new BallIdle());
    }
Exemplo n.º 3
0
    private BallView CreateBall()
    {
        BallView ball = Instantiate(_ballPrefab, gameObject.transform);

        SetBallSettings(ball);
        ball.gameObject.SetActive(false);
        ball.ReturnToPool = ReturnToPool;
        ball.AddPoints    = AddPoints;
        ball.Init();
        return(ball);
    }