コード例 #1
0
ファイル: PopulationBase.cs プロジェクト: nicktam/COPS_AI
        public void ReducePopulation(object source, EventArgs eventArgs)
        {
            --ActualPopulation;
            PopulationEventArgs args = new PopulationEventArgs();

            args.ActualPopulation = this.ActualPopulation;
            OnPopulationReduced(args);
        }
コード例 #2
0
ファイル: PopulationBase.cs プロジェクト: nicktam/COPS_AI
        protected virtual void OnPopulationReduced(PopulationEventArgs e)
        {
            EventHandler <PopulationEventArgs> handler = PopulationReduced;

            if (handler != null)
            {
                handler(this, e);
            }
        }