Example #1
0
    public void SetNewAbility(int abilityId, int spot)
    {
        ISpecial ability = new EmptyAbility();

        foreach (IAbility a in unlockedAbilities)
        {
            if (a.id == abilityId)
            {
                ability = (ISpecial)a;
            }
        }
        abilityArray[spot] = ability;
    }
Example #2
0
    public void Awake()
    {
        potentialAbilities = new List <IAbility>()
        {
            new GrenadeThrow(), new MedKit(), new Zap(), new BioGrenade(), new RIPRounds(),
            new ShieldBooster(), new Revive(), new SentryTurret(), new Flamethrower(), new Stimpak(), new Invigorate(),
            new ChainLightning(), new Shockwave(), new LeechDart(), new FlameWall(), new SniperShot(), new SMGShot(), new RifleShot(), new ShotgunShot()
        };
        AbilityBindings = new Dictionary <KeyCode, int>();

        Basic = new RifleShot();

        unlockedAbilities = new List <IAbility>();
        //LoadUnlockedAbilities();
        // LoadHotBar();

        abilityArray = new ISpecial[4];// { one, two, three, four };
        for (int i = 0; i < abilityArray.Length; i++)
        {
            abilityArray[i] = new EmptyAbility();
        }
        SetDefaultBindings();
    }
Example #3
0
 protected Enemy() : base()
 {
     Ability        = new EmptyAbility();
     this.Defeated += this.Enemy_Defeated;
 }