fehler in der Player Klasse behoben

(methode player_movement() entfernt)
This commit is contained in:
2026-09-15 10:44:15 +02:00
parent bb987610a2
commit 81fb707beb
4 changed files with 34 additions and 18 deletions
Binary file not shown.
+7 -3
View File
@@ -4,7 +4,11 @@ comment0.text=\r\n\ Write\ a\ description\ of\ class\ Player\ here.\r\n\ \r\n\ @
comment1.params= comment1.params=
comment1.target=void\ act() comment1.target=void\ act()
comment2.params= comment2.params=
comment2.target=void\ player_movement() comment2.target=void\ moveLeftAndRight()
comment3.params= comment3.params=
comment3.target=boolean\ onGround() comment3.target=void\ jump()
numComments=4 comment4.params=
comment4.target=void\ fall()
comment5.params=
comment5.target=boolean\ collision()
numComments=6
-1
View File
@@ -17,7 +17,6 @@ public class Player extends Actor
public void act() public void act()
{ {
player_movement();
collision(); collision();
moveLeftAndRight(); moveLeftAndRight();
jump(); jump();
+27 -14
View File
@@ -1,19 +1,25 @@
#Greenfoot project file #Greenfoot project file
class.Ground.image=weave.jpg class.Ground.image=weave.jpg
class.Player.image=ppl2.png class.Player.image=ppl2.png
dependency1.from=MyWorld dependency1.from=PlayerTestWorld
dependency1.to=Player dependency1.to=Ground
dependency1.type=UsesDependency dependency1.type=UsesDependency
dependency2.from=Player dependency2.from=PlayerTestWorld
dependency2.to=Ground dependency2.to=Player
dependency2.type=UsesDependency dependency2.type=UsesDependency
editor.fx.0.height=0 dependency3.from=MyWorld
editor.fx.0.width=0 dependency3.to=Player
editor.fx.0.x=0 dependency3.type=UsesDependency
editor.fx.0.y=0 dependency4.from=Player
dependency4.to=Ground
dependency4.type=UsesDependency
editor.fx.0.height=737
editor.fx.0.width=814
editor.fx.0.x=332
editor.fx.0.y=64
height=736 height=736
package.numDependencies=2 package.numDependencies=4
package.numTargets=3 package.numTargets=4
project.charset=UTF-8 project.charset=UTF-8
publish.hasSource=false publish.hasSource=false
publish.locked=true publish.locked=true
@@ -43,14 +49,21 @@ target2.width=120
target2.x=0 target2.x=0
target2.y=0 target2.y=0
target3.height=70 target3.height=70
target3.name=MyWorld target3.name=PlayerTestWorld
target3.showInterface=false target3.showInterface=false
target3.type=ClassTarget target3.type=ClassTarget
target3.width=120 target3.width=120
target3.x=0 target3.x=0
target3.y=0 target3.y=0
target4.height=70
target4.name=MyWorld
target4.showInterface=false
target4.type=ClassTarget
target4.width=120
target4.x=0
target4.y=0
version=3.1.0 version=3.1.0
width=856 width=856
world.lastInstantiated=MyWorld world.lastInstantiated=PlayerTestWorld
xPosition=652 xPosition=509
yPosition=76 yPosition=133