public BallController(string prefabName, ILevelRoot gameplayCanvas, Vector2 startPosition)
    {
        _ballView     = GameObject.Instantiate(Resources.Load <BallView>(prefabName), gameplayCanvas.Transform, true);
        StartPosition = startPosition;

        _ballView.Collision += OnCollision;
    }
Exemple #2
0
    public BaseBlock(string prefabName, ILevelRoot levelRoot, Vector3 position)
    {
        var template = Resources.Load <BlockView>(prefabName);

        View = GameObject.Instantiate(template, levelRoot.Transform, true);
        View.transform.position = position;
    }
Exemple #3
0
 public Player(string prefabName, ILevelRoot gameplayCanvas, Vector2 startPosition)
 {
     _playerView   = GameObject.Instantiate(Resources.Load <PlayerView>(prefabName), gameplayCanvas.Transform, true);
     StartPosition = startPosition;
 }
Exemple #4
0
    public ScoreController(ILevelRoot levelRoot)
    {
        var template = Resources.Load <ScoreView>("Prefabs/ScoreView");

        View = GameObject.Instantiate(template, levelRoot.Transform);
    }
    public TimePanelController(ILevelRoot levelRoot)
    {
        var template = Resources.Load <TimePanelView>("Prefabs/TimePanelView");

        _view = GameObject.Instantiate(template, levelRoot.Transform);
    }