Skip to content

Commit

Permalink
Merge pull request #19 from decentraland/chore-moveto_test_scene
Browse files Browse the repository at this point in the history
chore: added more cubes to move to test scene
  • Loading branch information
fcolarich authored Sep 18, 2024
2 parents 920a7f1 + 98e674c commit 70993cb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scenes/10,0-move-to-test/src/ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ const playerPositions = [
Vector3.create(2, 3.5, 6),
Vector3.create(3, 4.5, 6),
Vector3.create(4, 5.5, 6),
Vector3.create(3, 4.5, 6),
Vector3.create(2, 3.5, 6),
Vector3.create(4, 5.5, 8),
Vector3.create(3, 4.5, 8),
Vector3.create(2, 3.5, 8)
];

let currentPositionIndex = 0;
Expand All @@ -30,6 +31,9 @@ createCube(1,2,6);
createCube(2,3,6);
createCube(3,4,6);
createCube(4,5,6);
createCube(4,5,8);
createCube(3,4,8);
createCube(2,3,8);
}

function Fetch() {
Expand All @@ -49,7 +53,7 @@ function Fetch() {
fontSize={20}
variant="primary"
uiTransform={{ width: 300, height: 50 }}
onMouseDown={async () => {
onMouseDown={() => {
movePlayerTo({ newRelativePosition: playerPositions[currentPositionIndex] });
currentPositionIndex = (currentPositionIndex + 1) % playerPositions.length;}}
/>
Expand Down

0 comments on commit 70993cb

Please sign in to comment.