public void StartLevel(LevelsController controller) { gameObject.SetActive(true); _levelsController = controller; _cellsController = new CellsController(); CacheCells(); CellsController.FadeInAppearence(); }
// Start is called before the first frame update IEnumerator Start() { _cellsController = GetComponent <CellsController>(); _sprites = Resources.LoadAll <Sprite>(texture.name); yield return(new WaitUntil(() => _sprites.Length == 14)); NewGame(_sprites); }
public void Start() { //link controllers, models and views CellsDrawer view = GetComponent <CellsDrawer>(); CellsController cellsController = GetComponent <CellsController>(); GameManager gameManager = new GameManager(); cellsController.GameManager = gameManager; view.ListenTo(gameManager); //start game cellsController.StartGame(); }
public SelectionHandler(Context context) { _context = context; playersController = new PlayersController(_context); baController = new BAController(_context); cellsController = new CellsController(_context); shipTypeController = new ShipTypeController(_context); shipsController = new ShipsController(_context); duelsController = new DuelsController(_context); shipSelectionController = new ShipSelectionController(_context); armorSelection = new ArmorSelectionController(_context); strategyController = new StrategyController(_context); placeShipSelection = new PlaceShipSelection(shipSelectionController, _context); placeArmorSelection = new PlaceArmorSelection(armorSelection, _context); proxyPlayerTurn = new ProxyPlayerTurn(_context); }