Inheritance: MonoBehaviour
    public void NewGame()
    {
        game = new SimonSays(Cells.Length);
        game.neverGetRepeatedNumbers = neverGetRepeatedNumbers;
        StopAllCoroutines();

        StartCoroutine(FadeOutUI());
        StartCoroutine(Game());
    }
Exemplo n.º 2
0
        public void SimonSays_NoStrikesNoVowelTest()
        {
            var simonSaysModule = new SimonSays();

            bomb.Serial = "TB12C3";
            Assert.AreEqual("Press yellow.", simonSaysModule.Command(bomb, "simon says blue"), "Error Test #1", null);
            Assert.AreEqual("Press yellow blue.", simonSaysModule.Command(bomb, "simon says red"), "Error Test #2", null);
            Assert.AreEqual("Press yellow blue green.", simonSaysModule.Command(bomb, "simon says green"), "Error Test #3", null);
            Assert.AreEqual("Press yellow blue green red.", simonSaysModule.Command(bomb, "simon says yellow"), "Error Test #4", null);
            Assert.AreEqual("Module defused.", simonSaysModule.Command(bomb, "simon says solved"), "Error Test #5", null);
        }
Exemplo n.º 3
0
        public void SimonSays_OneStrikeVowelTest()
        {
            var simonSaysModule = new SimonSays();

            bomb.Serial = "AB12C3";
            Assert.AreEqual("Press red.", simonSaysModule.Command(bomb, "simon says blue"), "Error Test #1", null);
            Assert.AreEqual("Press red blue.", simonSaysModule.Command(bomb, "simon says red"), "Error Test #2", null);
            bomb.Command("bomb add strike");
            Assert.AreEqual("Press green yellow blue.", simonSaysModule.Command(bomb, "simon says green"), "Error Test #3", null);
            Assert.AreEqual("Press green yellow blue red.", simonSaysModule.Command(bomb, "simon says yellow"), "Error Test #4", null);
            Assert.AreEqual("Press green yellow blue red red.", simonSaysModule.Command(bomb, "simon says yellow"), "Error Test #5", null);
            Assert.AreEqual("Module defused.", simonSaysModule.Command(bomb, "simon says solved"), "Error Test #6", null);

            simonSaysModule = new SimonSays();
            Assert.AreEqual("Press green.", simonSaysModule.Command(bomb, "simon says blue"), "Error Test #1", null);
            Assert.AreEqual("Press green yellow.", simonSaysModule.Command(bomb, "simon says red"), "Error Test #2", null);
            Assert.AreEqual("Press green yellow blue.", simonSaysModule.Command(bomb, "simon says green"), "Error Test #3", null);
            Assert.AreEqual("Press green yellow blue red.", simonSaysModule.Command(bomb, "simon says yellow"), "Error Test #4", null);
            Assert.AreEqual("Press green yellow blue red red.", simonSaysModule.Command(bomb, "simon says yellow"), "Error Test #5", null);
            Assert.AreEqual("Module defused.", simonSaysModule.Command(bomb, "simon says solved"), "Error Test #6", null);
        }
Exemplo n.º 4
0
    void Awake()
    {
        damageMultiplier = 0f;
        simon            = GetComponent <SimonSays>();
        Debug.Log("Hi.");
        Debug.Log("Oh. I see your name is " + simon.name);
        Debug.Log("You are " + simon.age + " years old");

        simon.WhatIsGettingSad();

        bool theGettingSadValue = simon.GetTheGettingSadValue();

        Debug.Log("The value that you got was " + theGettingSadValue);

        int theHeightValue = simon.GetTheHeightValue();

        Debug.Log("The height value, which I cannot change, is " + theHeightValue);

        int x = Random.Range(0, 100);
        int y = Random.Range(0, 100);
        int theMathsAnswer = simon.GoobleyGobbley(x, y);

        Debug.Log(x + " plus " + y + " equals " + theMathsAnswer);
    }
Exemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     theSprite = GetComponent <SpriteRenderer>();
     script    = FindObjectOfType <SimonSays>();
     theSound  = GetComponent <AudioSource>();
 }
Exemplo n.º 6
0
    private SimonSays theSimon;     //manages Simon Says, use for calling KeyPressed

    // Use this for initialization
    void Start()
    {
        audio    = GetComponent <AudioSource>();
        theSimon = FindObjectOfType <SimonSays> ();
    }
Exemplo n.º 7
0
 void Start()
 {
     startscale  = transform.localScale;
     SimonObject = GetComponentInParent <SimonSays>();
 }