コード例 #1
0
ファイル: SimHandler.cs プロジェクト: Thomsch/EVA
        /// <summary>
        /// Initiate the simulation and instanciate the sub-handler of it.
        /// </summary>
        private SimHandler()
        {
            // The declaration of the singleton is done here because Unity forbides us to use the new keyword on MonoBehaviour objects.
            instance = this;
            control = new Control();
            statistics = new SimulationStatistics(10);
            population = new PopulationHandler(this);

            // Temporaire !
            //Parameters = new DefaultParameters();
            Step = 0;
        }
コード例 #2
0
ファイル: PopulationHandler.cs プロジェクト: Thomsch/EVA
 public PopulationHandler(SimHandler handler)
 {
     this.handler = handler;
     Organisms = new List<Organism>();
     LivingOrganisms = 0;
 }