100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Notas de lectura

Object Oriented Programming Health Guide

Puntuación
5.0
(1)
Vendido
1
Páginas
2
Subido en
12-07-2022
Escrito en
2018/2019

This document contains a guide on how to create a health system for the program, this guide will aid with the assignment.

Institución
Grado








Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Nivel de Estudio
Editores
Tema
Curso

Información del documento

Subido en
12 de julio de 2022
Número de páginas
2
Escrito en
2018/2019
Tipo
Notas de lectura
Profesor(es)
N/a
Contiene
Todas las clases

Temas

Vista previa del contenido

Hearts for Lives

1. Open your gameShell project
2. Add a Usercontrol call it Hearts.vb
3. Add three pictureboxes to contain hearts, and one that stretches over the three to hold the
Then add code to the usercontrol which will enable you to add lives, lose a life and
displaylives. Note: that displaylives is private [ie an example of an encapsulate method that
the user doesn’t need to know of its existence]
Public Class ucHearts
'this user control - demonstrates a Large heart image made up from several smaller heart
'and as each life dies so a small heart disappears... until there are none left = Game over
Private _Lives As Integer = 0 'max lives is 3
Public Property lives As Integer
Get
lives = _Lives
End Get
Set(ByVal value As Integer)
If value > 3 Then
_Lives = 3
Else
_Lives = value
End If
displayLives()
End Set
End Property
Public Sub loseLife()
_Lives -= 1
displayLives()
End Sub
Public Sub gainLife()
_Lives += 1
displayLives()
End Sub
Private Sub displayLives()
picGameOver.Visible = False
picGameOver.SendToBack()
Select Case _Lives
Case 0
noHearts()
picGameOver.Visible = True
picGameOver.BringToFront()
Case 1
picHeart1.Visible = True
picHeart2.Visible = False
picHeart3.Visible = False
Case 2
picHeart1.Visible = True
picHeart2.Visible = True
picHeart3.Visible = False
Case 3
picHeart1.Visible = True
picHeart2.Visible = True
picHeart3.Visible = True
Case Else
_Lives = 0
displayLives()
End Select
End Sub
Gratis
Accede al documento completo:
Descarga

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor
Seller avatar
ItsKenzie
5.0
(9)

Reseñas de compradores verificados

Se muestran los comentarios
3 año hace

5.0

1 reseñas

5
1
4
0
3
0
2
0
1
0
Reseñas confiables sobre Stuvia

Todas las reseñas las realizan usuarios reales de Stuvia después de compras verificadas.

Conoce al vendedor

Seller avatar
ItsKenzie University
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
20
Miembro desde
6 año
Número de seguidores
10
Documentos
78
Última venta
2 año hace
IT and Cyber Security Notes For Computing Students

I prepare and sell top quality notes and essays that are concise and easy to understand to fellow computing students. It can be overwhelming when you get your first few projects or assignments, using my notes and essays can help you to better understand the modules and hopefully help you get the grades you want. Thanks for visiting my profile, feedback is always appreciated.

5.0

9 reseñas

5
9
4
0
3
0
2
0
1
0

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes