Exemple #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;
    }
Exemple #2
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();
    }