Beispiel #1
0
        public static Dictionary <int, Dictionary <int, List <UnitAbility> > > GetAbilityUpgrades(dsreplay replay)
        {
            Dictionary <int, Dictionary <int, List <UnitAbility> > > Upgrades = new Dictionary <int, Dictionary <int, List <UnitAbility> > >();

            foreach (dsplayer pl in replay.PLAYERS)
            {
                Upgrades[pl.POS] = new Dictionary <int, List <UnitAbility> >();
                foreach (var ent in pl.AbilityUpgrades)
                {
                    int gameloop = ent.Key;
                    foreach (var upgrades in ent.Value)
                    {
                        UnitAbility a = AbilityPool.Map(upgrades);
                        if (a != null)
                        {
                            if (!Upgrades[pl.POS].ContainsKey(gameloop))
                            {
                                Upgrades[pl.POS][gameloop] = new List <UnitAbility>();
                            }
                            Upgrades[pl.POS][gameloop].Add(a);
                        }
                    }
                }
            }
            return(Upgrades);
        }
Beispiel #2
0
 static void InitUnits()
 {
     UpgradePool.Init();
     AbilityPool.Init();
     UnitPool.Init();
     AbilityPool.PoolInit();
 }
Beispiel #3
0
    private void ChangeAbilities(AbilityPool newAbilities)
    {
        currentAbilities.AttackAbility = newAbilities.AttackAbility;
        currentAbilities.DashAbility   = newAbilities.DashAbility;
        currentAbilities.ChargeAbility = newAbilities.ChargeAbility;

        currentAbilities.AttackAbility.Setup(this);
        currentAbilities.DashAbility.Setup(this);
        currentAbilities.ChargeAbility.Setup(this);
    }
            public override bool Inputs()
            {
                skipdata = true;
                bool ret = base.Inputs();

                skipdata = false;
                if (Commands != null)
                {
                    if (CURSOR_SELECT >= Commands.Count)
                    {
                        AbilityPool?.Show();
                        CommandsPool?.Hide();
                    }
                    else
                    {
                        AbilityPool?.Hide();
                        CommandsPool?.Show();
                    }
                }
                return(ret);
            }
Beispiel #5
0
 private void Awake()
 {
     abilityPool = new AbilityPool(abilityPoolBase);
     rerollButton.GetComponentInChildren <Text>().text = "" + RerollCost.Value;
 }