Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

DAY 5

I said the next step was to destroy the enemies. But, I decide to freeze the enemies for a while instead of destroying  them.

I'm not sure if its a good idea but it increases a little bit the game difficulty. You cannot destroy enemies and if they are frozen and you touch them, you lose.

The code to freeze enemies is quite simple, maybe there is a better way to do it:

        public void Freeze()
        {
            if (_isFrozen)
            {
                return;
            }
            _isFrozen = true;
            _animator.SetFloat(_fSpeedHash, 0);
            StartCoroutine(Defrost());
        }
        private IEnumerator Defrost()
        {
            yield return new WaitForSeconds(_defrostTime);
            _isFrozen = false;
        }
  • The player can fire and freeze enemies