コード例 #1
0
ファイル: GDMainEngine.cs プロジェクト: LuizZak/GDEngine
        /// <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();
        }
コード例 #2
0
ファイル: GenericOrgan.cs プロジェクト: mcauliffer/ApsimX
 /// <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();
 }
コード例 #3
0
ファイル: SimpleLeaf.cs プロジェクト: ianzhangtianyi/ApsimX
 /// <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;
 }
コード例 #4
0
ファイル: GenericOrgan.cs プロジェクト: MarkLieffering/ApsimX
 /// <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();
 }
コード例 #5
0
ファイル: Player.cs プロジェクト: JonnyMcFire/EpixCopy
        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));
            }
        }