Activa JavaScript para disfrutar de los vídeos de la Mediateca.
14 logical operators - Contenido educativo
Ajuste de pantallaEl ajuste de pantalla se aprecia al ver el vídeo en pantalla completa. Elige la presentación que más te guste:
in this tutorial we are going to
00:00:00
be using logic operations first of all go to
00:00:01
numbers and select these scripts here you
00:00:05
can see these are logic operations these
00:00:08
have two or more operands or either
00:00:10
true or false
00:00:13
i will be showing you examples of
00:00:15
possible combinations they are going to be
00:00:17
controlling an action and then this example
00:00:19
will be a sound so in sound we
00:00:22
can select play sound next we need
00:00:24
a control and that will be forever
00:00:27
and if then
00:00:30
make sure you don't forget to click
00:00:35
the when green flag clicked next go
00:00:38
to sensing
00:00:43
and we need to select touching mouse
00:00:45
pointer
00:00:47
so the first example we can use
00:00:49
the not we want to play a
00:00:52
sound when something is not happening and
00:00:54
that could be touching the other sprite
00:00:56
so when it's not touching the sprite
00:01:01
it will make the noise so let's
00:01:03
make it touch the second sprite we
00:01:05
can hear that is not making
00:01:08
so it isn't touching
00:01:12
the sound
00:01:14
next we can use the or operation
00:01:19
to this we are going to be
00:01:23
comparing two values so we duplicate this so
00:01:25
when touching sprite two or when touching
00:01:30
the edge so
00:01:35
here the condition is that script one
00:01:37
will make a sound if is touching
00:01:39
sprite two
00:01:41
not touching one or the other then
00:01:44
finally we can use the and operation
00:01:53
we can use the same touching sprite
00:01:57
two
00:01:59
and touching edge so for the sound
00:02:01
to play it has to be touching
00:02:04
the sprite and the edge
00:02:06
here we can hear that it only
00:02:10
touching script two then it will not make
00:02:13
a sound and if only touches the
00:02:15
edge it will not make a sound
00:02:17
after that true to make a sound
00:02:20
- Idioma/s:
- Autor/es:
- David Gonzalez Arroyo
- Subido por:
- David G.
- Licencia:
- Reconocimiento - No comercial - Compartir igual
- Visualizaciones:
- 111
- Fecha:
- 22 de febrero de 2021 - 14:52
- Visibilidad:
- Público
- Centro:
- IES MARIE CURIE Loeches
- Duración:
- 02′ 28″
- Relación de aspecto:
- 1.78:1
- Resolución:
- 1280x720 píxeles
- Tamaño:
- 20.52 MBytes