Exemple #1
0
 // Should be called when a player taps a critter.
 public void Stomped()
 {
     if (status == CritterStatus.Stompable)
     {
         status             = CritterStatus.Stomped;
         GridDisplay.Source = stompedFace;
         timeRemaining      = Constants.TimeToShowAsStomped;
     }
 }
Exemple #2
0
 // Should be called when a player taps a critter.
 public void Stomped()
 {
     if (status == CritterStatus.Stompable)
     {
         status = CritterStatus.Stomped;
         GridDisplay.Source = stompedFace;
         timeRemaining = Constants.TimeToShowAsStomped;
     }
 }
Exemple #3
0
 private void CritterRespawned()
 {
     life      = maxLife;
     enabled   = true;
     birthTime = Time.time;
     deadTime  = 0;
     lastTimeSienceConsumtion = Time.time;
     status = CritterStatus.Alive;
 }
Exemple #4
0
        public Critter(BitmapImage blankImage)
        {
            blankFace = blankImage;

            lifeTimer          = new DispatcherTimer();
            lifeTimer.Interval = TimeSpan.FromMilliseconds(Constants.TimeUnit);
            lifeTimer.Tick    += UpdateCritter;

            status = CritterStatus.Empty;
        }
Exemple #5
0
        public Critter(BitmapImage blankImage)
        {
            blankFace = blankImage;

            lifeTimer = new DispatcherTimer();
            lifeTimer.Interval = TimeSpan.FromMilliseconds(Constants.TimeUnit);
            lifeTimer.Tick += UpdateCritter;

            status = CritterStatus.Empty;
        }
Exemple #6
0
        public void Initialize(
            Image tappedImage,
            BitmapImage critterImage,
            BitmapImage stompedImage,
            int timeToLive
            )
        {
            GridDisplay = tappedImage;
            critterFace = critterImage;
            stompedFace = stompedImage;

            tappedImage.Source = critterFace;
            status             = CritterStatus.Stompable;
            timeRemaining      = timeToLive;

            lifeTimer.Start();
        }
Exemple #7
0
        public void Initialize(
            Image tappedImage,
            BitmapImage critterImage,
            BitmapImage stompedImage,
            int timeToLive
            )
        {
            GridDisplay = tappedImage;
            critterFace = critterImage;
            stompedFace = stompedImage;

            tappedImage.Source = critterFace;
            status = CritterStatus.Stompable;
            timeRemaining = timeToLive;

            lifeTimer.Start();
        }
Exemple #8
0
 public void ResetCritter()
 {
     lifeTimer.Stop();
     status             = CritterStatus.Empty;
     GridDisplay.Source = blankFace;
 }
Exemple #9
0
 public void ResetCritter()
 {
     lifeTimer.Stop();
     status = CritterStatus.Empty;
     GridDisplay.Source = blankFace;
 }
 private void CritterRespawned()
 {
     life = maxLife;
     enabled = true;
     birthTime = Time.time;
     deadTime = 0;
     lastTimeSienceConsumtion = Time.time;
     status = CritterStatus.Alive;
 }
 public void Overfeeded()
 {
     status = CritterStatus.Overfeeded;
     Die();
 }
 public void Starve()
 {
     status = CritterStatus.Starved;
     Die();
 }
Exemple #13
0
 public void Overfeeded()
 {
     status = CritterStatus.Overfeeded;
     Die();
 }
Exemple #14
0
 public void Starve()
 {
     status = CritterStatus.Starved;
     Die();
 }