예제 #1
0
파일: Chapel.cs 프로젝트: EmilieS/Gleipnir
 public Chapel(Village ownerVillage)
     : base(ownerVillage)
 {
     AddFaith = 5;
     AddHapiness = 0;
     EnterPrice = 0;
 }
예제 #2
0
파일: Meeting.cs 프로젝트: EmilieS/Gleipnir
 public Meeting(Family f)
     : base(f.Game)
 {
     _family = f;
     _village = f.OwnerVillage;
     Convocate();
 }
예제 #3
0
 internal UpgradesModel(Game g, Village v)
     : base(g)
 {
     _isActivated = new HistorizedValue<bool, UpgradesModel>(this, "IsActivated", 5);
     _owner = v;
     IsActivated = false;
 }
예제 #4
0
 public Fertilizer(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs)
     : base(g, v)
 {
     CostPrice = 1000;
     IsActivated = false;
     _selected = _jobs.Farmer;
     _owner = v;
 }
예제 #5
0
파일: Level3.cs 프로젝트: EmilieS/Gleipnir
 public Level3(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs)
     : base(g,v)
 {
     CostPrice = 800;
     IsActivated = false;
     _selected = _jobs.Cooker;
     _owner = v;
 }
예제 #6
0
 public Scarecrow(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs)
     : base(g, v)
 {
     CostPrice = 500;
     IsActivated = false;
     _selected = _jobs.Farmer;
     _owner = v;
 }
예제 #7
0
파일: Saw.cs 프로젝트: EmilieS/Gleipnir
 internal Saw(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs)
     : base(g, v)
 {
     CostPrice = 600;
     IsActivated = false;
     _selected = _jobs.Blacksmith;
     _owner = v;
 }
예제 #8
0
 internal SamhainFest(Village v)
     : base(v.Game)
 {
     _duration = 15;
     _timer = _duration;
     _village = v;
     ActOnvillagers(v);
 }
예제 #9
0
 internal Whitewash(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs)
     : base(g, v)
 {
     CostPrice = 100;
     IsActivated = false;
     _selected = _jobs.Cooker;
     _owner = v;
 }
예제 #10
0
파일: Pulley.cs 프로젝트: EmilieS/Gleipnir
 internal Pulley(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs)
     : base(g, v)
 {
     CostPrice = 200;
     IsActivated = false;
     _selected = _jobs.Construction_Worker;
     _owner = v;
 }
예제 #11
0
파일: Plow.cs 프로젝트: EmilieS/Gleipnir
 public Plow(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs)
     : base(g,v)
 {
     CostPrice = 1000;
     IsActivated = false;
     _selected = _jobs.Blacksmith;
     _owner = v;
     _jobsList = _jobs;
 }
예제 #12
0
 public ApothecaryOffice(Village v, JobsModel job)
     : base(v)
 {
     Name = "Pharmacie";
     _name = Name;
     Hp = MaxHp = 50;
     _job = job;
     this.CostPrice = 200;
 }
예제 #13
0
 public void ActOnvillagers(Village village)
 {
     foreach (Family family in village.FamiliesList)
         foreach (Villager villager in family.FamilyMembers)
         {
             //if (!villager.IsHeretic())
                 villager.FestStarted();
             villager.AddOrRemoveHappiness(3);
             villager.AddOrRemoveFaith(2);
         }
 }
예제 #14
0
 internal BuildingsModel(Village ownerVillage)
     : base(ownerVillage.Game)
 {
     _horizontalPos = 0;
     _verticalPos = 0;
     _addedHappiness = 0;
     _addedFaith = 0;
     _enterPrice = 0;
     //_robustness = 0;
     _isBought = false;
     _ownerVillage = ownerVillage;
     ownerVillage.AddBuildingIntheList(this); //needs to be in village !
 }
예제 #15
0
파일: Meeting.cs 프로젝트: EmilieS/Gleipnir
 //public void AffectMissionToVillager(Villager villager, Missions expectedMission)
 //{
 //    if (expectedMission != villager.Mission)
 //    {
 //        villager.Mission = expectedMission;
 //    }
 //}
 internal override void OnDestroy()
 {
     _village.MeetingEnded();
     _village = null;
     _family = null;
 }
예제 #16
0
파일: Game.cs 프로젝트: EmilieS/Gleipnir
 // Village Methods
 /// <summary>
 /// Create new village "Name"
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public Village CreateVillage(string name)
 {
     if (String.IsNullOrWhiteSpace(name))
         throw new ArgumentNullException(@"(game, CreateVillage) Invalid name");
     var v = new Village(this, name);
     _villagesList.Add(v);
     return v;
 }
예제 #17
0
 public ApothecaryOffice(Village ownerVillage)
     : base(ownerVillage)
 {
 }
예제 #18
0
        public static Boolean HasStructureSurroundingStructure(Structure NewStructure, Village Village, int Radius)
        {
            for (int i = 0; i < Village.StructureList.Count; i++)
            {
                //check if intersecting
                for (int nx = 0; nx < NewStructure.WX; nx++)
                {
                    for (int nz = 0; nz < NewStructure.WZ; nz++)
                    {
                        Point NRotPoint = MathUtil.MathUtil.RotatePoint(nx, nz, NewStructure.Angle);
                        NRotPoint.X += NewStructure.Position.X;
                        NRotPoint.Y += NewStructure.Position.Z;

                        for (int tx = 0; tx < Village.StructureList[i].WX; tx++)
                        {
                            for (int tz = 0; tz < Village.StructureList[i].WZ; tz++)
                            {
                                Point TRotPoint = MathUtil.MathUtil.RotatePoint(tx, tz, Village.StructureList[i].Angle);
                                TRotPoint.X += Village.StructureList[i].Position.X;
                                TRotPoint.Y += Village.StructureList[i].Position.Z;

                                if (MathUtil.MathUtil.distance(NRotPoint, TRotPoint) < Radius)
                                {
                                    return(true);
                                }
                            }
                        }
                    }
                }
            }

            return(false);
        }