예제 #1
0
        public Orchardist(Town town) : base("orchardist", town.Market)
        {
            var eat = new EatBehavior(this);

            this.Behaviors.Add(eat);

            this.Behaviors.Add(new ProduceBehavior(
                                   this,
                                   town,
                                   eat,
                                   new AreaProduceBehaviorOptions(this, town, Constants.Apples)
            {
                BaseAmount       = 1,
                EatFactor        = 2,
                ToolsFactor      = 2,
                ToolsBreakChance = 0.1
            }
                                   ));
            this.Behaviors.Add(new ProduceBehavior(
                                   this,
                                   town,
                                   eat,
                                   new AreaProduceBehaviorOptions(this, town, Constants.Oranges)
            {
                BaseAmount       = 1,
                EatFactor        = 2,
                ToolsFactor      = 2,
                ToolsBreakChance = 0.1
            }
                                   ));

            this.Behaviors.Add(new WorkerBehavior(this));

            this.Inventory.Add(Constants.Money, 100);
        }
예제 #2
0
        public Blacksmith(Town town) : base("blacksmith", town.Market)
        {
            var eat = new EatBehavior(this);

            this.Behaviors.Add(eat);
            this.Behaviors.Add(new BlacksmithBehavior(this, eat));
            this.Behaviors.Add(new WorkerBehavior(this));

            this.Inventory.Add(Constants.Money, 100);
        }
예제 #3
0
        public Miller(Town town) : base("miller", town.Market)
        {
            var eat = new EatBehavior(this);

            this.Behaviors.Add(eat);
            this.Behaviors.Add(new MillerBehavior(this, town, eat));
            this.Behaviors.Add(new WorkerBehavior(this));

            this.Inventory.Add(Constants.Money, 100);
        }
예제 #4
0
        public Fisherman(Town town) : base("fisherman", town.Market)
        {
            var eat = new EatBehavior(this);

            this.Behaviors.Add(eat);
            this.Behaviors.Add(new ProduceBehavior(
                                   this,
                                   town,
                                   eat,
                                   new AreaProduceBehaviorOptions(this, town, Constants.Fish)
            {
                BaseAmount       = 1,
                EatFactor        = 2,
                ToolsFactor      = 2,
                ToolsBreakChance = 0.1
            }
                                   ));
            this.Behaviors.Add(new WorkerBehavior(this));

            this.Inventory.Add(Constants.Money, 100);
        }
예제 #5
0
 public BlacksmithBehavior(Agent agent, EatBehavior eat) : base(agent)
 {
     this.eat = eat;
 }
예제 #6
0
 public MillerBehavior(Agent agent, Town town, EatBehavior eat) : base(agent)
 {
     this.town = town;
     this.eat  = eat;
 }
예제 #7
0
파일: Sawyer.cs 프로젝트: esandstedt/laguna
 public SawyerBehavior(Agent agent, EatBehavior eat) : base(agent)
 {
     this.eat = eat;
 }