void Start()
    {
        grid      = GetComponent <Grid>();
        gameLogic = GetComponent <AITTTGameLogic>();
        aiScript  = GetComponent <AIScript>();

        canvasScaler = GameObject.Find("Canvas").GetComponent <CanvasScaler>();

        Color htc = helpText.color; htc.a = 0; helpText.color = htc;

        // change think time of ai to a bit more
        gameLogic.aiMinThinkTime = 1.3f;

        // change ai difficulty to really ahrd first so the player doesnt get throught the first like 20 signs for sure
        aiScript.SetDifficulty(4);

        // subscribe to placed sign event
        grid.SignWasPlacedEvent       += SignWasPlayed;
        gameLogic.SomeoneWonGameEvent += SomeoneWonGame;

        clickImge.DOFade(1f, 0.2f);
        clickImge.rectTransform.DOScale(1.1f, 0.6f).SetLoops(-1, LoopType.Yoyo);

        ScaneManager.Instance.backButtonEnabled = false;
    }
Beispiel #2
0
    void Start()
    {
        rand      = new System.Random();
        grid      = GetComponent <Grid>();
        gameLogic = GetComponent <AITTTGameLogic>();
        Reset();

        // subscribe to events
        grid.SignWasPlacedEvent       += SignWasAdded;
        grid.SignWasRemovedEvent      += SignWasRemoved;
        gameLogic.SomeoneWonGameEvent += SomeoneWonGame;
    }