forked from ppfun/pixelplanet
go back to click to move
This commit is contained in:
parent
0d9ac167c3
commit
9abd199821
|
@ -88,7 +88,7 @@ const MovementControls = () => {
|
||||||
|
|
||||||
const onCancel = useCallback((event) => {
|
const onCancel = useCallback((event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// dispatch(cancelMove());
|
dispatch(cancelMove());
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const refCallBack = useCallback((node) => {
|
const refCallBack = useCallback((node) => {
|
||||||
|
|
|
@ -145,7 +145,7 @@ export default function gui(
|
||||||
|
|
||||||
case 's/SET_MOVE_U': {
|
case 's/SET_MOVE_U': {
|
||||||
const { value } = action;
|
const { value } = action;
|
||||||
const moveU = state.moveU + value;
|
const moveU = value;
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
moveU,
|
moveU,
|
||||||
|
@ -154,7 +154,7 @@ export default function gui(
|
||||||
|
|
||||||
case 's/SET_MOVE_V': {
|
case 's/SET_MOVE_V': {
|
||||||
const { value } = action;
|
const { value } = action;
|
||||||
const moveV = state.moveV + value;
|
const moveV = value;
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
moveV,
|
moveV,
|
||||||
|
@ -163,7 +163,7 @@ export default function gui(
|
||||||
|
|
||||||
case 's/SET_MOVE_W': {
|
case 's/SET_MOVE_W': {
|
||||||
const { value } = action;
|
const { value } = action;
|
||||||
const moveW = state.moveW + value;
|
const moveW = value;
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
moveW,
|
moveW,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user