Esempio n. 1
0
            #-------------------------------------------------------------------------------------------------------------------------------------------
            #---------------------------------------------------- clic sur le bouton "start/stop" ------------------------------------------------------
            #-------------------------------------------------------------------------------------------------------------------------------------------
            #	+changer boolean is_started du bouton
            #	+changer apparence du bouton
            if b1.obj.collidepoint(event.pos):

                #si est lance :
                #	+retour du bateau a la position de depart
                if b1.check_is_started():
                    boat1.body.position = depart.X + 15, fenetre.get_size(
                    )[1] - depart.Y - 50
                    index_list = 0
                    b1.change_started_bool()
                    b1.change_appearance()
                    simu.stop()
                    redraw()

                #si la simulaiton n'est pas lance
                #	+initialisation de la vitesse du bateau
                else:
                    boat1.speed = 300
                    b1.change_started_bool()
                    b1.change_appearance()
                    simu.start()
                    redraw_empty()

        #-------------------------------------------------------------------------------------------------------------------------------------------
        #----------------------------------------------------------- click sur le bouton "clear" ---------------------------------------------------
        #-------------------------------------------------------------------------------------------------------------------------------------------