Exemplo n.º 1
0
        private IEnumerable <Model> LoadCharacterModelList(bool all)
        {
            IoC.Notif.ShowStatus("Loading characters list...");
            var models = CharacterGen.GetCharacterModels(all);

            return(models.OrderBy(x => x.ToString().Contains("DLC") ? 1 : 0).ThenBy(x => x.ToString()));
        }
Exemplo n.º 2
0
        public override async Task Initialize()
        {
            ResetSelected.Enabled = false;
            IoC.Notif.ShowUnknownProgress();

            IoC.Notif.ShowStatus("Loading outfit list...");
            DefaultOutfits = (await OutfitGen.GenerateOutfits(
                                  IoC.Archiver.LoadGameFileAsync)).ToHashSet();

            //some outfits, like undergarments, are never used in game by the player and only create problems if switched
            var ignored = IoC.Get <OutfitConfig>().IgnoredOutfits.ToHashSet();

            Outfits = DefaultOutfits
                      .Where(x => !ignored.Contains(x.Name))
                      .Select(x => x.Clone()).OrderBy(x => x.DisplayName)
                      .ToList().AsReadOnly();

            PopulateOutfitsList();

            await UpdateModelList();

            UpdateAllOutfitsSelection();

            //start loading characters in background
            Async.Run(() => CharacterGen.GetCharacterModels(true)).Forget();
        }
Exemplo n.º 3
0
        public override void ApplyChanges(Patch patch)
        {
            var models = OutfitGen.GenerateModelList(IoC.Archiver.LoadGameFile);

            models.AddRange(CharacterGen.GetCharacterModels(true));

            Patcher.CreatePatch(patch, DefaultOutfits.ToList(), Outfits, models);
        }
Exemplo n.º 4
0
    // Use this for initialization
    public void Start()
    {
        info = new PlayerInformation();
        info.Awake();
        chars           = new CharacterGen();
        enemyTypeNumber = 0;
        playerNumber    = 1;
        for (int i = 0; i < Enum.GetValues(typeof(AttributeName)).Length; i++)
        {
            info.GetPrimaryAttribute(i).BaseValue = chars.STARTING_VALUE;
        }
        characterName           = String.Empty;
        itemAmount              = 0;
        _primaryAttribute       = new string[info._primaryAttribute.Length];
        _primaryAttributeValues = new int[info._primaryAttribute.Length];
        _vital            = new string[info._vital.Length];
        _vitalValue       = new int[info._vital.Length];
        _mana             = new string[info._mana.Length];
        _manaValue        = new int[info._mana.Length];
        _attack           = new string[info._attack.Length];
        _attackValue      = new int[info._attack.Length];
        _defence          = new string[info._defence.Length];
        _defenceValue     = new int[info._defence.Length];
        moneyTotal        = 0;
        money             = new MoneySystem();
        itemsNameArray    = new ArrayList();
        itemsContentArray = new ArrayList();
        experience        = 100;

        nextLevelvalue = experience * 1.2f;
        nextLevel      = (int)(experience * 1.2f);
        level          = 1;
        initiliseConstantVariables();

        playerPos = GameObject.FindGameObjectWithTag("Player");
        if (playerPos != null)
        {
            positionOnScreen = playerPos.transform.position;
        }


        if (PlayerPrefs.GetString("Player Name") != "")
        {
            LoadData();
        }
    }
Exemplo n.º 5
0
        public override async Task LoadPatch(string path)
        {
            IoC.Notif.ShowStatus("Loading outfits...");

            var patchOutfits = await OutfitGen.GenerateOutfits(f =>
                                                               IoC.Archiver.LoadFileAsync(path, f));

            if (!patchOutfits.Any())
            {
                return;
            }

            await Initialize();

            var loadedOutfits  = patchOutfits.ToHashSet();
            var variantMapping = await CharacterGen.GetVariantMapping(path, OutfitGen);

            LoadOutfits(loadedOutfits, variantMapping);

            RefreshOutfitList();
        }
    // Use this for initialization
    public void Start()
    {
        info = new PlayerInformation();
        info.Awake();
        chars = new CharacterGen();
        enemyTypeNumber =0;
        playerNumber =1;
        for (int i = 0; i < Enum.GetValues(typeof(AttributeName)).Length; i++) {
            info.GetPrimaryAttribute (i).BaseValue = chars.STARTING_VALUE;
        }
        characterName = String.Empty;
        itemAmount = 0;
        _primaryAttribute = new string[info._primaryAttribute.Length];
        _primaryAttributeValues=new int[info._primaryAttribute.Length];
        _vital = new string[info._vital.Length];
        _vitalValue=new int[info._vital.Length];
        _mana = new string[info._mana.Length];
        _manaValue=new int[info._mana.Length];
        _attack = new string[info._attack.Length];
        _attackValue = new int[info._attack.Length];
        _defence = new string[info._defence.Length];
        _defenceValue = new int[info._defence.Length];
        moneyTotal=0;
        money = new MoneySystem();
        itemsNameArray = new ArrayList();
        itemsContentArray = new ArrayList();
        experience =100;

        nextLevelvalue = experience*1.2f;
        nextLevel = (int)(experience*1.2f);
        level =1;
        initiliseConstantVariables();

        playerPos = GameObject.FindGameObjectWithTag("Player");
        if(playerPos!=null)
            positionOnScreen= playerPos.transform.position;

        if(PlayerPrefs.GetString ("Player Name")!= ""){
            LoadData();
        }
    }
Exemplo n.º 7
0
 public void WhenCreating()
 {
     _characterGen = new CharacterGen();
 }