100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4,6 TrustPilot
logo-home
College aantekeningen

Object Oriented Programming Health Guide

Beoordeling
5,0
(1)
Verkocht
1
Pagina's
2
Geüpload op
12-07-2022
Geschreven in
2018/2019

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

Instelling
Vak








Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Study Level
Publisher
Subject
Course

Documentinformatie

Geüpload op
12 juli 2022
Aantal pagina's
2
Geschreven in
2018/2019
Type
College aantekeningen
Docent(en)
N/a
Bevat
Alle colleges

Onderwerpen

Voorbeeld van de inhoud

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
Krijg toegang tot het volledige document:
Downloaden

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten

Maak kennis met de verkoper
Seller avatar
ItsKenzie
5,0
(9)

Beoordelingen van geverifieerde kopers

Alle reviews worden weergegeven
3 jaar geleden

5,0

1 beoordelingen

5
1
4
0
3
0
2
0
1
0
Betrouwbare reviews op Stuvia

Alle beoordelingen zijn geschreven door echte Stuvia-gebruikers na geverifieerde aankopen.

Maak kennis met de verkoper

Seller avatar
ItsKenzie University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
20
Lid sinds
6 jaar
Aantal volgers
10
Documenten
78
Laatst verkocht
2 jaar geleden
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 beoordelingen

5
9
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen