示例#1
0
 public void StartLevel(LevelsController controller)
 {
     gameObject.SetActive(true);
     _levelsController = controller;
     _cellsController  = new CellsController();
     CacheCells();
     CellsController.FadeInAppearence();
 }
示例#2
0
    // 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);
    }
示例#3
0
    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();
    }
示例#4
0
 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);
 }