lance3d
This commit is contained in:
3
core.cm
3
core.cm
@@ -707,9 +707,6 @@ return {
|
||||
// System / Style
|
||||
set_style: set_style,
|
||||
get_style: get_style,
|
||||
get_style_config: get_style_config,
|
||||
switch_style: switch_style,
|
||||
set_resolution: set_resolution,
|
||||
time: time,
|
||||
dt: dt,
|
||||
stat: stat,
|
||||
|
||||
@@ -89,7 +89,7 @@ function _init() {
|
||||
}
|
||||
|
||||
function _update(dt) {
|
||||
if (lance3d._state.keys_held['escape']) {
|
||||
if (lance3d.key('escape')) {
|
||||
$_.stop()
|
||||
return
|
||||
}
|
||||
@@ -97,10 +97,10 @@ function _update(dt) {
|
||||
// Movement input
|
||||
var forward = 0
|
||||
var right = 0
|
||||
if (lance3d._state.keys_held['w']) forward += 1
|
||||
if (lance3d._state.keys_held['s']) forward -= 1
|
||||
if (lance3d._state.keys_held['d']) right -= 1
|
||||
if (lance3d._state.keys_held['a']) right += 1
|
||||
if (lance3d.key('w')) forward += 1
|
||||
if (lance3d.key('s')) forward -= 1
|
||||
if (lance3d.key('d')) right -= 1
|
||||
if (lance3d.key('a')) right += 1
|
||||
|
||||
if (forward != 0 || right != 0) {
|
||||
// Update yaw based on movement direction
|
||||
|
||||
Reference in New Issue
Block a user