Terrarium.Game.GameEngine.uncountOrganism C# (CSharp) Method

uncountOrganism() private method

Subtracts an organism from the count of organisms. Depending on the organism type either plants or animals will be decremented.
private uncountOrganism ( OrganismState state, PopulationChangeReason reason ) : void
state OrganismState The state of the creature.
reason PopulationChangeReason The reason the creature is being removed.
return void
        private void uncountOrganism(OrganismState state, PopulationChangeReason reason)
        {
            Debug.Assert(state != null);

            _populationData.UncountOrganism(((Species) state.Species).Name, reason);
            if (state is AnimalState)
            {
                _animalCount--;
            }
            else
            {
                _plantCount--;
            }
        }