示例#1
0
 public void CheckGun()
 {
     if (hasgun == false)
     {
         if (Goodguy.IsTouching(pictureBoxGun))
         {
             hasgun = true;
             pictureBoxGun.Visible = false;
         }
     }
 }
示例#2
0
 private void CheckDoors()
 {
     //if (pictureBoxPlayer.IsTouching(labelDeath))
     //{
     //    MainForm.NextForm = "GameOver";
     //    Close();
     //}
     if (Goodguy.IsTouching(pictureBoxCave))
     {
         MainForm.NextForm = "SecondForm";
         Close();
     }
 }
示例#3
0
        private bool CanMove()
        {
            if (Goodguy.IsInsideOfForm() == false)
            {
                return(false);
            }

            foreach (var tree in trees)
            {
                if (Goodguy.IsTouching(tree) == true)
                {
                    return(false);
                }
            }

            return(true);
        }