-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Juan Manuel Rodrigo UTN <[email protected]>
Co-authored-by: Sebastián Santiago Ayala Osorio <[email protected]> Avanzamos
- Loading branch information
Showing
3 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,31 @@ | ||
import wollok.game.* | ||
|
||
object personajedefensor { | ||
object militar { | ||
var property image = "militarPrueba.png" | ||
var property position = game.origin() | ||
|
||
} | ||
|
||
object enemigo{ | ||
class Enemigo{ | ||
var property image = "alien.png" //imagen de base | ||
var position = game.at(2,2) | ||
|
||
method position() = position | ||
method moverseRandom(){ | ||
|
||
} | ||
|
||
method moverseSolo() { | ||
position = game.at(0.randomUpTo(4),0.randomUpTo(4) ) | ||
} | ||
method subir() { | ||
position = position.up(1) | ||
} | ||
} | ||
|
||
const enemigo1 = new Enemigo() | ||
|
||
class Proyectil { | ||
var property image = "" //agregar imagen | ||
var property position = game.origin() | ||
var property position = game.origin()// la bala proviene del personaje | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters