예제 #1
0
    public void CancelSelection()
    {
        switch (curChar)
        {
        case SelectableCharacters.Leslie:
            CD.GetComponent <Collider2D>().isTrigger = true;
            Leslie.GetComponent <Image>().sprite     = HoverImages[0];
            break;

        case SelectableCharacters.Jona:
            ND.GetComponent <Collider2D>().isTrigger = true;
            Jona.GetComponent <Image>().sprite       = HoverImages[1];
            break;

        case SelectableCharacters.Ashita:
            NED.GetComponent <Collider2D>().isTrigger = true;
            Ashita.GetComponent <Image>().sprite      = HoverImages[2];
            break;

        case SelectableCharacters.Catarine:
            ED.GetComponent <Collider2D>().isTrigger = true;
            Catarine.GetComponent <Image>().sprite   = HoverImages[3];
            break;

        case SelectableCharacters.Ramsey:
            SED.GetComponent <Collider2D>().isTrigger = true;
            Ramsey.GetComponent <Image>().sprite      = HoverImages[4];
            break;

        case SelectableCharacters.Drogas:
            SD.GetComponent <Collider2D>().isTrigger = true;
            Drogas.GetComponent <Image>().sprite     = HoverImages[5];
            break;

        case SelectableCharacters.Sylvia:
            SWD.GetComponent <Collider2D>().isTrigger = true;
            Sylvia.GetComponent <Image>().sprite      = HoverImages[6];
            break;

        case SelectableCharacters.Bjin:
            WD.GetComponent <Collider2D>().isTrigger = true;
            Bjin.GetComponent <Image>().sprite       = HoverImages[7];
            break;

        case SelectableCharacters.Xavier:
            NWD.GetComponent <Collider2D>().isTrigger = true;
            Xavier.GetComponent <Image>().sprite      = HoverImages[8];
            break;

        case SelectableCharacters.None:
            break;

        default:
            break;
        }
        weaponSelect.SetActive(false);
        weaponSelectActive = false;
        characterChosen    = false;
    }
예제 #2
0
        public void FiveTests()
        {
            int tests = 5;

            string[] testsExamples = new string[] { "1 4", "4 1", "12 48", "48 100", "123456 653421" };
            NWD      nwd           = new NWD(tests, testsExamples);

            Assert.AreEqual(1, nwd.GetDeivsors()[0]);
            Assert.AreEqual(1, nwd.GetDeivsors()[1]);
            Assert.AreEqual(12, nwd.GetDeivsors()[2]);
            Assert.AreEqual(4, nwd.GetDeivsors()[3]);
            Assert.AreEqual(3, nwd.GetDeivsors()[4]);
        }
예제 #3
0
    public void selectChar()
    {
        switch (curChar)
        {
        case SelectableCharacters.Leslie:
            TextObject.GetComponentInChildren <Text>().text = "Leslie Selected";
            Leslie.GetComponent <Image>().sprite            = SelectedImages[0];
            CD.GetComponent <Collider2D>().isTrigger        = false;
            break;

        case SelectableCharacters.Jona:
            TextObject.GetComponentInChildren <Text>().text = "Jona Selected";
            Jona.GetComponent <Image>().sprite       = SelectedImages[1];
            ND.GetComponent <Collider2D>().isTrigger = false;
            break;

        case SelectableCharacters.Ashita:
            TextObject.GetComponentInChildren <Text>().text = "Ashita Selected";
            Ashita.GetComponent <Image>().sprite            = SelectedImages[2];
            NED.GetComponent <Collider2D>().isTrigger       = false;
            break;

        case SelectableCharacters.Catarine:
            TextObject.GetComponentInChildren <Text>().text = "Catarine Selected";
            Catarine.GetComponent <Image>().sprite          = SelectedImages[3];
            ED.GetComponent <Collider2D>().isTrigger        = false;
            break;

        case SelectableCharacters.Ramsey:
            TextObject.GetComponentInChildren <Text>().text = "Ramsey Selected";
            Ramsey.GetComponent <Image>().sprite            = SelectedImages[4];
            SED.GetComponent <Collider2D>().isTrigger       = false;
            break;

        case SelectableCharacters.Drogas:
            TextObject.GetComponentInChildren <Text>().text = "Drogas Selected";
            Drogas.GetComponent <Image>().sprite            = SelectedImages[5];
            SD.GetComponent <Collider2D>().isTrigger        = false;
            break;

        case SelectableCharacters.Sylvia:
            TextObject.GetComponentInChildren <Text>().text = "Sylvia Selected";
            Sylvia.GetComponent <Image>().sprite            = SelectedImages[6];
            SWD.GetComponent <Collider2D>().isTrigger       = false;
            break;

        case SelectableCharacters.Bjin:
            TextObject.GetComponentInChildren <Text>().text = "Bjin Selected";
            Bjin.GetComponent <Image>().sprite       = SelectedImages[7];
            WD.GetComponent <Collider2D>().isTrigger = false;
            break;

        case SelectableCharacters.Xavier:
            TextObject.GetComponentInChildren <Text>().text = "Xavier Selected";
            Xavier.GetComponent <Image>().sprite            = SelectedImages[8];
            NWD.GetComponent <Collider2D>().isTrigger       = false;
            break;

        default:
            break;
        }
        characterChosen = true;
        weaponMenu();
    }