void Awake()
 {
     cardSpawner = GameObject.FindWithTag("GameController").GetComponent <CardSpawner> ();
     cam         = Camera.main;
     buttonFill  = GetComponent <Image> ();
     col         = GetComponent <Collider> ();
 }
示例#2
0
 void Start()
 {
     cardSpawner = GetComponent <CardSpawner>();
     GenerateCards();
     RepositionCards();
     currectCardIndex = 0;
 }
示例#3
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);
    }
示例#4
0
    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);
    }
示例#5
0
 public void Start()
 {
     Instance = this;
     StartCoroutine(GiveStartingCards());
 }
示例#6
0
 void Start()
 {
     cards       = GameObject.Find("Hand");
     cardSpawner = cards.GetComponent <CardSpawner>();
 }