public DangerousEntity(int x, int y, Image image, bool left, PictureBox pictureBox, Frog frog, frogBox frogger) { //Sets the entity PictureBox this.entity = pictureBox; //Sets xpos this.xpos = x; //Sets ypos this.ypos = y; //Sets frog this.frog = frog; //Sets image this.image = image; //Sets left this.left = left; //Sets instance this.instance = frogger; //Sets Entity's BackgroundImage this.entity.BackgroundImage = image; //Sets Entity's BackgroundImageLayout this.entity.BackgroundImageLayout = ImageLayout.Stretch; //Determines if it is fliped left or right this.entity.BackgroundImage.RotateFlip(left ? RotateFlipType.Rotate90FlipNone : RotateFlipType.Rotate270FlipNone); //Sets startingLocationX this.startingLocationX = x; //Sets startingLocationY this.startingLocationY = y; //Moves the cars position changeLocation(); //move(); //Thread thread = new Thread(new ThreadStart(Run)); //thread.Start(); }
private void start_game_Click(object sender, EventArgs e) { this.Hide(); using (frogBox frogger = new frogBox()) { frogger.ShowDialog(); } }
public Frog(int x, int y, PictureBox pictureBox, PictureBox endingBox, frogBox instance) { //Sets the istance this.instance = instance; //Sets the xpos this.xpos = x; //Sets the ypos this.ypos = y; //Sets the image this.image = SITTING_FROG; //Sets the frogs picturebox this.frog = pictureBox; //Sets the ending box this.endingBox = endingBox; //Stretches the background frog.BackgroundImageLayout = ImageLayout.Stretch; //Sets the frogs image frog.BackgroundImage = image; changeLocation(); }