ce si est le code du jeu course , plz aidez moi a le rendre jouable en resaux , encore plz apportez lui vos amelioration et envoyez les moi a chouaiebamine@yahoo.fr
Source / Exemple :
Dim Score As Integer
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyLeft: Image1.Left = Image1.Left - 840
Case vbKeyRight: Image1.Left = Image1.Left + 840
End Select
End Sub
Private Sub Form_Load()
Timer1.Interval = 500
End Sub
Private Sub Timer1_Timer()
Score = Label1.Caption
Shape1(0).Top = Shape1(0).Top + 120
Shape1(1).Top = Shape1(1).Top + 120
Shape1(2).Top = Shape1(2).Top + 120
If Image1.Top = Shape1(0).Top And Image1.Left = Shape1(0).Left Then
Label1.Caption = Label1.Caption + 10
End If
If Image1.Top = Shape1(1).Top And Image1.Left = Shape1(1).Left Then
Label1.Caption = Label1.Caption + 10
End If
If Image1.Top = Shape1(2).Top And Image1.Left = Shape1(2).Left Then
Label1.Caption = Label1.Caption + 10
End If
If Score = 100 Then
Timer1.Interval = 300
End If
If Score = 200 Then
Timer1.Interval = 200
End If
If Score = 300 Then
Timer1.Interval = 100
End If
If Score = 400 Then
Timer1.Interval = 50
End If
If Score = 500 Then
Timer1.Interval = 25
End If
If Score = 600 Then
Timer1.Interval = 15
End If
If Score = 700 Then
Timer1.Interval = 5
End If
If Score = 800 Then
Timer1.Interval = 3
End If
If Score = 900 Then
Timer1.Interval = 2
End If
If Score = 1000 Then
Timer1.Interval = 0
MsgBox "Vous éte sacrés chompion supréme de se jeux", vbOKOnly, "Fin"
End If
If Shape1(0).Top = 1920 Then
Shape1(0).Top = 0
End If
If Shape1(1).Top = 1920 Then
Shape1(1).Top = 0
End If
If Shape1(2).Top = 1920 Then
Shape1(2).Top = 0
End If
End Sub
Conclusion :
faite form1 et mettez y un label1 , shape1 ,shape2 et shape3 enfin un controle timer !
28 mars 2001 à 12:49
12 avril 2001 à 23:30
24 avril 2001 à 03:41
et puis en laissant le nuage sur place et ben tu gagnes des points...
a ameliorer
25 avril 2001 à 11:37
Mais "Course"? J'dirais plutôt attrape-cube? Sino, kel code! mé bon, pr l'améliorer sais pô moi? Euh, le rendre + jouissif en rajouter 1 I.A + poussé pr les cubes bleus ki tombent tjrs du même endroit en haut? Bref, je vais voir c'ke j'peux faire pr t'aider à améliorer... 8)
22 juil. 2001 à 02:28
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.