예제 #1
0
        public void PutBomb()
        {
            Point playerPoint = player.MyNowPoint();

            if (map[playerPoint.X, playerPoint.Y] == Sost.бомба)
            {
                return;
            }
            if (player.PutBomb(mapPic, Babah))
            {
                ChangeSost(player.MyNowPoint(), Sost.бомба);
            }
        }
예제 #2
0
파일: Mob.cs 프로젝트: dsigmat/BomberMan
        private void GetNewPlace()
        {
            if (level >= 3)
            {
                destinePlace = player.MyNowPoint();
                if (FindPath())
                {
                    return;
                }
            }
            int loop = 0;

            do
            {
                destinePlace.X = rand.Next(1, map.GetLength(0) - 1);
                destinePlace.Y = rand.Next(1, map.GetLength(1) - 1);
            } while (!FindPath() && loop++ < 100);
            if (loop >= 100)
            {
                destinePlace = mobPlace;
            }
        }