Exemple #1
0
 private void PoopTimer_Tick(Object myObject, EventArgs myEventArgs)
 {
     if (ateEnoughToPoop)
     {
         Logger.OutputToLog(WhoAmI + " pooped.", Logger.LogLevel.Message);
         Poop.CreatePoop(World, X, Y);
         ateEnoughToPoop = false;
     }
     poopTimer.Interval = Utility.NextRandom(1000, 10000);
 }
Exemple #2
0
        public static Poop CreatePoop(World world, int nearX, int nearY)
        {
            AnimationFramesInMultipleFiles poopImages = new AnimationFramesInMultipleFiles();

            poopImages.Add("poop.png");
            Poop poop = new Poop(world, new Sprite(new SpriteImageMultipleFiles(poopImages)), PoopBoundingRadius);

            poop.Position = world.GetRandomLocationNear(nearX, nearY, poop.Width, poop.Height, PoopBoundingRadius * 3);
            return(poop);
        }