JuegoDinosaurio

Created by Leonel Morales Diaz

You need to download Java software in order to view this Alice world. Please visit this page: http://www.alice.org/applet/requirements/

Created with Alice, the easy-to-learn programming system. Provided free as a public service by Carnegie Mellon University


If you don't see 3d graphics on this page, click for help.

JuegoDinosaurio's Code

Created by: Leonel Morales Diaz

world

Events

When the world starts
Do:
world.my first method


While Izquierda is pressed
Begin:
trex.Voltear ADerecha = false
During: <None>
End: <None>


While Derecha is pressed
Begin:
trex.Voltear ADerecha = true
During: <None>
End: <None>


Methods

  world.my first method ( )
    No variables
       Do together
       Loop infinity times  times
       If ( either ( either mosasaur.Mordiendo or mosasaur2.Mordiendo , or both ) or mosasaur3.Mordiendo , or both )
       trex roll at speed left speed = 1 revolutions per second 
  Else
    trex move at speed forward speed = 1 meter per second 
  Loop infinity times  times
       trex.Walk Duracion = 2
  Loop infinity times  times
       If ( either ( either ( either ( square.TocandoTRex ) or ( square2.TocandoTRex ) , or both ) or ( square3.TocandoTRex ) , or both ) or ( square4.TocandoTRex ) , or both )
       trex move up 0.07 meters  style = abruptly duration = .1 seconds 
  Else
    trex move down 0.05 meters  style = abruptly duration = 0.1 seconds 
  Loop infinity times  times
       square.SubirYBajar
  Loop infinity times  times
       square2.SubirYBajar
  Loop infinity times  times
       square3.SubirYBajar
  Loop infinity times  times
       square4.SubirYBajar
  Loop infinity times  times
       Wait ( ( 30 * 3D Text.NivelActual ) )
  3D Text.NivelActual set value to ( ( 3D Text.NivelActual + 1 ) )
  3D Text set text to ( Nivel joined with ( 3D Text.NivelActual as a string ) ) duration = 0 seconds 
  world set speedMultiplier to ( ( ( world . speedMultiplier ) + 1 ) ) duration = 0 seconds 
  Loop infinity times  times
       dial roll at speed left ( ( 1 / ( ( 30 * 3D Text.NivelActual ) ) ) )
  Loop infinity times  times
       If mosasaur.Mordiendo
       mosasaur.Swim Duracion = 1
  Else
    mosasaur.Swim Duracion = 3
  Loop infinity times  times
       If mosasaur2.Mordiendo
       mosasaur2.Swim Duracion = 1
  Else
    mosasaur2.Swim Duracion = 3
  Loop infinity times  times
       If mosasaur3.Mordiendo
       mosasaur3.Swim Duracion = 1
  Else
    mosasaur3.Swim Duracion = 3
  Loop infinity times  times
       If ( either ( mosasaur.TRexNear ) or mosasaur.Mordiendo , or both )
       mosasaur.MorderTRex
  Else
    mosasaur.SubirYBajar
  Loop infinity times  times
       If ( either ( mosasaur2.TRexNear ) or mosasaur2.Mordiendo , or both )
       mosasaur2.MorderTRex
  Else
    mosasaur2.SubirYBajar
  Loop infinity times  times
       If ( either ( mosasaur3.TRexNear ) or mosasaur3.Mordiendo , or both )
       mosasaur3.MorderTRex
  Else
    mosasaur3.SubirYBajar
  Loop infinity times  times
       print ( square.TocandoTRex )
  print ( dummy distance in front of dummy2 )
  print ( dummy distance above dummy2 )
  print ( world . speedMultiplier )


Functions

  Number world.GetAlturaTecho ( )
    No variables
     Do Nothing
Return world.AlturaTecho