Example #1
0
 private void InitializeVariables()
 {
     mPieces           = new List <Piece>(100);
     mInvaders         = new List <Invader>(100);
     mProjectiles      = new List <Projectile>(100);
     mSelection        = new Selection();
     cellsToFlash      = new Dictionary <GridCell, double>();
     invaderMothership = new InvaderMothership();
 }
Example #2
0
        public Invader(InvaderMothership motherShip, bool flying)
        {
            // initialize a low level invader
            State      = InvaderState.Alive;
            Experience = 0;
            Parent     = motherShip;
            Flying     = flying;

            // set the attributes
            mAttributes = new Dictionary <InvaderAttributes, float>();

            // load in the minimum values
            MinMaxValues.Keys.ToList().ForEach(attr => mAttributes[attr] = MinMaxValues[attr].Min);

            // set the level denominator
            LevelDenominator = (MaxInvaderLevel / (float)BaseImageKeys.Count);
        }