2.2.2 Cycle 6
Design
Objectives
Usability Features
Key Variables
Variable Name
Use
Pseudocode
speed = 100
if (cursors.left.Down || keyA.isDown)
{
z-index: 0
faune.anims.play('faune-run-side', true)
faune.setVelocity(-speed, 0)
currentkey = left
}
else if (cursors.right.Down || keyD.isDown)
{
z-index: 0
faune.anims.play('faune-run-side', true)
faune.setVelocity(speed, 0)
faune.body.offset.x = 8
currentkey = right
}
else if (cursors.up.Down || keyW.isDown)
{
z-index: 0
faune.anims.play('faune-run-up', true)
faune.setVelocity(0, -speed)
currentkey = up
}
else if (cursors.down.Down || keyS.isDown)
{
z-index: 0
faune.anims.play('faune-run-down', true)
faune.setVelocity(0, speed)
currentkey = down
}
else
{
parts = 'idle'
this.faune.anims.play()
this.faune.setVelocity(0, 0)
}Development
Outcome
Challenges
Testing
Tests
Test
Instructions
What I expect
What actually happens
Pass/Fail
Tests
Test
Instructions
What I expect
What actually happens
Pass/Fail
Last updated