Ejemplo n.º 1
0
 public override void Update(float elapsedTime_)
 {
     textures.GetTex("swipe").Update(elapsedTime_);
     if (state == GodState.Attacking)
     {
         if (textures.GetTex("swipe").Ended())
         {
             GameData.godHunger -= GameData.GodFeed;
             if (GameData.godHunger < 0)
             {
                 GameData.godHunger = 0;
             }
             target.exists = false;
             GameData.citizensOutside--;
             state = GodState.Idle;
         }
     }
     if (GameData.godAnger == 100)
     {
         GameData.attacks++;
         GameData.DestroyBuilding();
         GameData.godAnger = 50;
     }
     base.Update(elapsedTime_);
 }
Ejemplo n.º 2
0
 public void Attack()
 {
     if (state != GodState.Attacking)
     {
         if (FindVillager())
         {
             state = GodState.Attacking;
             textures.GetTex("swipe").Reset();
             GameData.madness += GameData.MadnessGain;
             if (GameData.madness > 100)
             {
                 GameData.madness = 100;
             }
             SoundManager.PlayEffect("sacrifice");
         }
     }
 }
Ejemplo n.º 3
0
 public God(DrawerCollection textures_, PositionManager pos_, List <Property> properties_, string name_, string type_) : base(textures_, pos_, properties_, name_, type_)
 {
     state      = GodState.Idle;
     mood       = GodMood.Ok;
     currentTex = textures.GetTex("idle");
 }