Professional Documents
Culture Documents
Player
Player
Player
x = 34, y = 34,
speedY = 0, speedX = 0,
direction="right", jumping="false",
HalfWidth = 0, HalfHeight = 0,
health = 100, alive="true",
RelativeX = 0, RelativeY = 0,
timer=0, --the timer variable for rotating the animation Images
lj = image.load("img/left/jump.png"),
ld = image.load("img/left/crouch.png"),
Rd = image.load("img/right/crouch.png"),
rj = image.load("img/right/jump.png"),
}
playerwalkright = {image.load("img/right/stand.png"),
image.load("img/right/walk1.png"),
image.load("img/right/walk2.png") }
playerwalkleft = {image.load("img/left/stand.png"),
image.load("img/left/walk1.png"),
image.load("img/left/walk2.png")}
playerrunright = {image.load("img/right/Rstand.png"),
image.load("img/right/run1.png"),
image.load("img/right/run2.png") }
playerrunleft = {image.load("img/left/Rstand.png"),
image.load("img/left/run1.png"),
image.load("img/left/run2.png")}
player.img = playerwalkright[1]
player.height=player.img:height()
player.width=player.img:width()