public BallController(string prefabName, ILevelRoot gameplayCanvas, Vector2 startPosition) { _ballView = GameObject.Instantiate(Resources.Load <BallView>(prefabName), gameplayCanvas.Transform, true); StartPosition = startPosition; _ballView.Collision += OnCollision; }
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; }
public Player(string prefabName, ILevelRoot gameplayCanvas, Vector2 startPosition) { _playerView = GameObject.Instantiate(Resources.Load <PlayerView>(prefabName), gameplayCanvas.Transform, true); StartPosition = startPosition; }
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); }