Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Samuel Germain (sjg970)
Line_rider_love_2d
Commits
3b5a87ce
Commit
3b5a87ce
authored
May 29, 2018
by
Samuel Germain (sjg970)
Browse files
Add new file (Camera.lua)
parent
18e43ab2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Camera.lua
0 → 100644
View file @
3b5a87ce
Camera
=
{
x
=
0
,
y
=
0
}
function
Camera
.
update
(
dt
)
if
love
.
keyboard
.
isDown
(
"right"
)
then
--RIGHT ARROW BUTTON IS DOWN then
Camera
.
x
=
Camera
.
x
+
5
elseif
love
.
keyboard
.
isDown
(
"left"
)
then
Camera
.
x
=
Camera
.
x
-
5
end
if
love
.
keyboard
.
isDown
(
"up"
)
then
Camera
.
y
=
Camera
.
y
-
5
elseif
love
.
keyboard
.
isDown
(
"down"
)
then
Camera
.
y
=
Camera
.
y
+
5
end
end
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment