Ejemplo n.º 1
0
        /// <summary>
        /// Call this function after the draw function, and after the spriteBatch.end call, to free
        /// the memory from the used resources that must be cleaned
        /// </summary>
        public void PostDraw()
        {
            CurrentScreen.PostDraw();

            // Check for killed entities:
            for (int i = 0; i < Removed.Count; i++)
            {
                if (Removed[i].parent != null)
                {
                    Removed[i].parent.removeChild(Removed[i]);
                }

                Removed[i].Free(false);
            }

            Removed.Clear();
        }
Ejemplo n.º 2
0
 /// <summary>Clears this instance.</summary>
 protected virtual void Clear()
 {
     Live = new Biomass();
     Dead = new Biomass();
     dryMatterSupply.Clear();
     nitrogenSupply.Clear();
     dryMatterDemand.Clear();
     nitrogenDemand.Clear();
     potentialDMAllocation           = 0.0;
     potentialStructuralDMAllocation = 0.0;
     potentialMetabolicDMAllocation  = 0.0;
     dryMatterDemand.Clear();
     Allocated.Clear();
     Senesced.Clear();
     Detached.Clear();
     Removed.Clear();
 }
Ejemplo n.º 3
0
 /// <summary>Clears this instance.</summary>
 private void Clear()
 {
     Live = new Biomass();
     Dead = new Biomass();
     DMSupply.Clear();
     NSupply.Clear();
     DMDemand.Clear();
     NDemand.Clear();
     potentialDMAllocation.Clear();
     Allocated.Clear();
     Senesced.Clear();
     Detached.Clear();
     Removed.Clear();
     Height          = 0;
     LAI             = 0;
     LeafInitialised = false;
 }
Ejemplo n.º 4
0
 /// <summary>Clears this instance.</summary>
 protected virtual void Clear()
 {
     Live.Clear();
     Dead.Clear();
     DMRetranslocationSupply         = 0.0;
     DMReallocationSupply            = 0.0;
     NRetranslocationSupply          = 0.0;
     NReallocationSupply             = 0.0;
     PotentialDMAllocation           = 0.0;
     PotentialStructuralDMAllocation = 0.0;
     PotentialMetabolicDMAllocation  = 0.0;
     StructuralDMDemand = 0.0;
     StorageDMDemand    = 0.0;
     Allocated.Clear();
     Senesced.Clear();
     Detached.Clear();
     Removed.Clear();
 }
Ejemplo n.º 5
0
        public void Reset()
        {
            Name                = "";
            Class               = "";
            Id                  = -1;
            GoingFirst          = false;
            Fatigue             = 0;
            DrawnCardsMatchDeck = true;
            Hand.Clear();
            Board.Clear();
            Deck.Clear();
            Graveyard.Clear();
            Secrets.Clear();
            DrawnCardIds.Clear();
            DrawnCardIdsTotal.Clear();
            RevealedCards.Clear();
            CreatedInHandCardIds.Clear();
            Removed.Clear();

            for (var i = 0; i < DeckSize; i++)
            {
                Deck.Add(new CardEntity(null));
            }
        }