Jump to content
  • 0

Ajutor DMV


BaFFyJunior

Question

Salut! Incerc sa fac un sistem dmv ceva mai complex si vreau ca daca nu iti pui centura de siguranta sa pici testul. La inceputul testului sa trebuiasca sa pornesti motorul, altfel sa nu poti incepe testul. Are cineva vreo idee cum as putea face asta? Sunt incepator, nu sariti pe mine. Multumesc anticipat!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

 Logic ar fi intai sa-ti pui centura si apoi sa pornesti motorul, zic doar. Deci cum ai facut faza cu pornirea motorului pentru a incepe testul, asa sa faci si la  faza cu centura. Presupun ca ai facut niste variabile care se schimba in momentul in care executi ceva, de exemplu pornirea motorului. Variabila se schimba in 1 (sau true daca ai facut de tip boolean) si apoi porneste testul, asa poti sa faci si cu centura, cand nu o ai pusa e -1, si cand o pui devine 1. Faci sistemul a.i sa detecteze daca centura e pusa, iar daca nu sa-l pice.

76561198110915771.pngAddFriend.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.