コード例 #1
0
        public void ConfigureForSnake(SnakeScript snake)
        {
            _playerId        = snake.GetInstanceID();
            _playerName.text = snake.name;
            var keys = snake.KeyCodePair;

            _playerKeys.text = string.Format("{0} + {1}", keys.LeftKey, keys.RightKey);
        }
コード例 #2
0
        public void EnableSnakeCell(SnakeScript snake)
        {
            var cellView = _cellViews.FirstOrDefault(s => s.PlayerId == snake.GetInstanceID());

            if (cellView)
            {
                cellView.SetTextColor(Color.green);
            }
        }