void Awake() { cardSpawner = GameObject.FindWithTag("GameController").GetComponent <CardSpawner> (); cam = Camera.main; buttonFill = GetComponent <Image> (); col = GetComponent <Collider> (); }
void Start() { cardSpawner = GetComponent <CardSpawner>(); GenerateCards(); RepositionCards(); currectCardIndex = 0; }
void Start() { _spawner = FindObjectOfType <CardSpawner>(); _spawner.OnChangePick += HandleChangeValidity; _stateMachine = new StateMachine <CardSelectionState>(); _stateMachine.AddState(CardSelectionState.ChooseBondage, ChooseBondageStart, ChooseBondageUpdate, ChooseBondageStop); _stateMachine.AddState(CardSelectionState.ChooseTouch, ChooseTouchStart, ChooseTouchUpdate, ChooseTouchStop); _stateMachine.AddState(CardSelectionState.ChooseAction, ChooseActionStart, ChooseActionUpdate, ChooseActionStop); _stateMachine.CurrentState = CardSelectionState.ChooseTouch; consentButton.SetActivey(false); }
public void InitializeServices() { _cardSpawner = null ?? GetComponent <CardSpawner>(); _sceneHandler = null ?? GetComponent <EndGameUI>(); _hudManager = null ?? GetComponent <HUDManager>(); _gameData = null ?? new GameDataManager(); _pairChecker = null ?? new PairChecker(); _serverCommunication = null ?? new ServerCommunications(); _serializer = null ?? new JsonSerializer(saveFolder); _scoreCalculator = null ?? new ScoreCalculator(); _scoreboardManager = null ?? new ScoreboardManager(_gameData, _scoreCalculator, _serializer); }
public void Start() { Instance = this; StartCoroutine(GiveStartingCards()); }
void Start() { cards = GameObject.Find("Hand"); cardSpawner = cards.GetComponent <CardSpawner>(); }