void Start() { previousCol = column; previuseRow = row; board = FindObjectOfType <BoardCtrl>(); findMatches = FindObjectOfType <FindMatchesCtrl>(); }
private void ExtraInitializeComponent() { _boardCtrl = new BoardCtrl(); _indicatorCtrl = new IndicatorCtrl(); _timerLabel = new Label(); _ballCountLabel = new Label(); _undoLabel = new Label { Text = @"Undo", Enabled = false }; _undoLabel.Click += undoLabel_Click; _enableUndo = false; var workingArea = Screen.PrimaryScreen.WorkingArea; var minDimension = workingArea.Height < workingArea.Width ? workingArea.Height : workingArea.Width; _indicatorCtrl.Location = new Point(0, 0); _indicatorCtrl.Height = minDimension * 5 / 100; // 5% of min. dimension _boardCtrl.Location = new Point(0, _indicatorCtrl.Height); _boardCtrl.CellClick += boardCtrl_CellClick; _boardCtrl.BallClick += boardCtrl_BallClick; Controls.Add(_indicatorCtrl); Controls.Add(_boardCtrl); Controls.Add(_timerLabel); Controls.Add(_ballCountLabel); Controls.Add(_undoLabel); }
// Start is called before the first frame update void Awake() { enemyDeck = new List <GameObject>(); board = FindObjectOfType <BoardCtrl>(); isEnemyTurn = false; deckPos = new Vector3(10.0f, 10.0f, 2.0f); }
// Start is called before the first frame update void Awake() { playerDeck = new List <GameObject>(); board = FindObjectOfType <BoardCtrl>(); isPlayerTurn = false; deckPos = new Vector3(-10.0f, -10.0f, 2.0f); leftDown = rightDown = false; }
// Start is called before the first frame update void Start() { spriteRenderer = GetComponent <SpriteRenderer>(); player = FindObjectOfType <PlayerCtrl>(); enemy = FindObjectOfType <EnemyCtrl>(); board = FindObjectOfType <BoardCtrl>(); m_Owner = CARD_OWNER.DECK; //m_Type = CARD_TYPE.NONE; //m_Number = m_Damage = 0; }
private void boardCtrl_CellClick(BoardCtrl ctrl, Point cell) { var ball = _game.Board.GetSelectedBall(); if ((ball == null) || (!_game.LockBoard())) { return; } // Move ball if (!_game.MoveTo(cell)) { // Wasn't able to move _game.UnlockBoard(); } }
// Start is called before the first frame update void Awake() { instance = this; pv = photonView; }
private void boardCtrl_BallClick(BoardCtrl ctrl, BallCtrl ballCtrl) { _game.Board.SelectBall(ballCtrl.Ball); }
// Use this for initialization void Start() { board = FindObjectOfType <BoardCtrl>(); }