private void Start() { _cardSpacing = new Vector2(HorizontalSpacing, VerticalSpacing); _gameView = GetComponentInParent <GameViewSystem>(); _game = _gameView.Container; Cards = new List <CardView>(); for (var i = 0; i < Owner[Zone].Count; i++) { var card = Owner[Zone][i]; foreach (var a in card.Attributes) { a.Owner = card; } var targetRotation = GetRotation(); var cardView = Instantiate(_gameView.CardPrefab, GetPosition(i), Quaternion.Euler(targetRotation), transform); cardView.Card = card; cardView.transform.name = card.Data.CardName; Cards.Add(cardView); } }
private void Awake() { _gameView = GetComponentInParent <GameViewSystem>(); _canvas = GetComponent <Canvas>(); _canvasScaler = _canvas.GetComponent <CanvasScaler>(); _descriptionContainer = DescriptionText.rectTransform.parent.GetComponent <RectTransform>(); _actionContainer = ActionText.rectTransform.parent.GetComponent <RectTransform>(); Hide(); }
private void Awake() { _gameView = GetComponentInParent <GameViewSystem>(); _gameContainer = _gameView.Container; _match = _gameContainer.Match; Global.Events.Subscribe(Notification.Prepare <ChangeTurnAction>(), OnPrepareChangeTurn); Global.Events.Subscribe(Notification.Perform <ChangeTurnAction>(), OnPerformChangeTurn); Global.Events.Subscribe(VictorySystem.GAME_OVER_NOTIFICATION, ShowGameOver); }
private void Awake() { Global.Events.Subscribe(Notification.Prepare <PlayToBoardAction>(), OnPreparePlayToBoard); Global.Events.Subscribe(Notification.Prepare <DamagePlayerAction>(), OnPrepareDamagePlayer); Global.Events.Subscribe(Notification.Prepare <DiscardAction>(), OnPrepareDiscard); Global.Events.Subscribe(Notification.Prepare <DamageCreatureAction>(), OnPrepareDamageCreature); Global.Events.Subscribe(Notification.Prepare <ShuffleDeckAction>(), OnPrepareShuffleDeck); _gameView = GetComponent <GameViewSystem>(); if (_gameView == null) { Debug.LogError("BoardView could not find GameView"); } }
private void Awake() { Global.Events.Subscribe(Notification.Prepare <DrawCardsAction>(), OnPrepareDrawCards); Global.Events.Subscribe(Notification.Prepare <ReturnToHandAction>(), OnPrepareReturnToHand); Global.Events.Subscribe(Notification.Prepare <PlayCardAction>(), OnPreparePlayCard); _gameView = GetComponent <GameViewSystem>(); _boardView = GetComponent <BoardView>(); if (_gameView == null) { Debug.LogError("BoardView could not find GameView"); } }
private void Awake() { _gameView = GetComponentInParent <GameViewSystem>(); _cursor = FindObjectOfType <CursorController>(); _button = GetComponent <Button>(); }
void Awake() { Instance = this; }
private void Awake() { UnityEngine.Cursor.visible = false; _gameView = GetComponentInParent <GameViewSystem>(); }