Exemplo n.º 1
0
        public static void AddTiersToName(this TowerModel towerModel)
        {
            var tiers = towerModel.tiers;

            if (tiers is null)
            {
                towerModel.AddTiersToName(0, 0, 0);
            }
            else
            {
                int tier1 = tiers.Count >= 1 ? tiers[0] : 0;
                int tier2 = tiers.Count >= 2 ? tiers[1] : 0;
                int tier3 = tiers.Count >= 3 ? tiers[2] : 0;

                towerModel.AddTiersToName(tier1, tier2, tier3);
            }
        }
Exemplo n.º 2
0
        public static void SetTiers(this TowerModel towerModel, int tier1 = 0, int tier2 = 0, int tier3 = 0, bool addToTowerName = false)
        {
            towerModel.tiers    = new UnhollowerBaseLib.Il2CppStructArray <int>(3);
            towerModel.tiers[0] = tier1;
            towerModel.tiers[1] = tier2;
            towerModel.tiers[2] = tier3;

            if (addToTowerName)
            {
                towerModel.AddTiersToName();
            }
        }