Exemplo n.º 1
0
 private void DisplayCharacterSelected(string charName)
 {
     artwork.GetComponent <SpriteRenderer>().flipX = true;
     characterSeries = CharacterSelectionMapping.GetCharacterSeries(charName);
     artwork.GetComponent <SpriteRenderer>().sprite = Resources.Load <Sprite>("Textures_and_Sprites/Menus/Interface/CharacterSelectionMenu/CharacterProfile/"
                                                                              + characterSeries + "/" + charName + "/" + charName + "PortraitSelection");
     series.GetComponent <Image>().sprite = Resources.Load <Sprite>("Textures_and_Sprites/Menus/Interface/CharacterSelectionMenu/CharacterProfile/"
                                                                    + characterSeries + "/" + characterSeries + "_logo");
     series.GetComponent <Image>().color = new Color(series.GetComponent <Image>().color.r, series.GetComponent <Image>().color.g, series.GetComponent <Image>().color.b, 1f);
 }
Exemplo n.º 2
0
    private void ChooseOneRandom()
    {
        string charName = "";

        do
        {
            charName        = CharacterSelectionMapping.GetCharacter(Random.Range(0, 4));
            characterSeries = CharacterSelectionMapping.GetCharacterSeries(charName);
        }while(!ChooseCharacter(charName));
    }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        characterName = CurrentFightStats.GetSelectedCharacter(transform.GetSiblingIndex(), gameObject.tag);
        //characterName = "Ken";  //For testing
        characterSeries = CharacterSelectionMapping.GetCharacterSeries(characterName);
        var type = Type.GetType(characterName);

        character = (Character)Activator.CreateInstance(type);
        healthBar = new HealthBar(health.transform.GetChild(transform.GetSiblingIndex()).gameObject, character.GetHealth(), characterName);
        animator.runtimeAnimatorController = Resources.Load("Animation/Characters/" + characterSeries + "/" + characterName + "/" + characterName) as RuntimeAnimatorController;
        SetIsAI(CurrentFightStats.GetAI(transform.tag));
        characterVoice = CharacterVoicePlayer.GetComponent <CharacterVoice>();
    }
Exemplo n.º 4
0
    private void SetVsPortraits(GameObject portraits)
    {
        int portraitNumber = 0;

        foreach (Transform portrait in portraits.transform)
        {
            string charName        = CurrentFightStats.GetSelectedCharacter(portraitNumber, portrait.tag);
            string characterSeries = CharacterSelectionMapping.GetCharacterSeries(charName);
            portrait.GetComponent <SpriteRenderer>().sprite = Resources.Load <Sprite>("Textures_and_Sprites/Menus/Interface/CharacterSelectionMenu/CharacterProfile/"
                                                                                      + characterSeries + "/" + charName + "/" + "Chosen" + charName + "Background");
            portraitNumber++;
        }
    }