Exemple #1
0
    public void BeginSelection(int _iPlayerSelectingFor, int _iChrSelectingFor, System.Action _fnOnSelectionComplete, LoadoutManager.Loadout loadoutToStart)
    {
        iPlayerSelectingFor = _iPlayerSelectingFor;
        iChrSelectingFor    = _iChrSelectingFor;

        fnOnSelectionComplete = _fnOnSelectionComplete;

        txtLabel.text = string.Format("Loadout for {0}", CharType.GetChrName(ChrTypeSelectingFor()));

        //Initialize the saved loadouts dropdown
        InitSavedLoadoutsDropdown();

        //Need to initialize the loadout selector with whatever loadout is currently defined for this character in matchsetup
        InitWithLoadout(loadoutToStart);
    }
    public void SetChrInSlot(CharType.CHARTYPE _chrInSlot)
    {
        chrInSlot = _chrInSlot;

        if (chrInSlot == CharType.CHARTYPE.LENGTH)
        {
            SetEmptySlot();
            return;
        }

        string sChrName = CharType.GetChrName(chrInSlot);

        txtChrNameLabel.text = sChrName;

        //For some reason, setting the overrideSprite (rather than the normal sprite) works here.  Unity is dumb
        imgPortrait.overrideSprite = Resources.Load("Images/Chrs/" + sChrName + "/img" + sChrName + "neutral", typeof(Sprite)) as Sprite;
        //LibView.AssignSpritePathToObject("Images/Chrs/" + sChrName + "/img" + sChrName + "neutral", this.gameObject);
    }
Exemple #3
0
    // Used to initiallize information fields of the Chr
    // Call this after creating to set information
    public void InitChr(CharType.CHARTYPE _chartype, Player _plyrOwner, int _id, LoadoutManager.Loadout loadout)
    {
        chartype  = _chartype;
        sName     = CharType.GetChrName(chartype);
        plyrOwner = _plyrOwner;
        id        = _id;
        globalid  = id + plyrOwner.id * Player.MAXCHRS;

        RegisterChr(this);

        //Initialize this character's disciplines based on their chartype
        InitDisciplines();

        //Initialize any loadout-specific qualities of the character
        InitFromLoadout(loadout);

        view.Init();
    }
    public void LogCharacterSelections(int iPlayer)
    {
        for (int iChr = 0; iChr < Player.MAXCHRS; iChr++)
        {
            CharType.CHARTYPE chartype = NetworkMatchSetup.GetCharacterSelection(iPlayer, iChr);

            WriteToMatchLogFile(string.Format("cs:{0}:{1}:{2}:{3}", iPlayer, iChr, (int)chartype, CharType.GetChrName(chartype)));
        }
    }