Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PlatVenture
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JACQUIER Timeo
PlatVenture
Commits
3903e3eb
Commit
3903e3eb
authored
3 years ago
by
timeo
Browse files
Options
Downloads
Patches
Plain Diff
fix les assets
parent
27634a76
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/src/etat/Play.java
+25
-17
25 additions, 17 deletions
core/src/etat/Play.java
with
25 additions
and
17 deletions
core/src/etat/Play.java
+
25
−
17
View file @
3903e3eb
package
etat
;
package
etat
;
import
static
handlers
.
B2DVars
.
PPM
;
import
static
handlers
.
B2DVars
.
PPM
;
import
com.badlogic.gdx.Application
;
import
com.badlogic.gdx.Gdx
;
import
com.badlogic.gdx.Gdx
;
import
com.badlogic.gdx.files.FileHandle
;
import
com.badlogic.gdx.files.FileHandle
;
import
com.badlogic.gdx.graphics.GL20
;
import
com.badlogic.gdx.graphics.GL20
;
...
@@ -15,6 +17,7 @@ import com.badlogic.gdx.physics.box2d.FixtureDef;
...
@@ -15,6 +17,7 @@ import com.badlogic.gdx.physics.box2d.FixtureDef;
import
com.badlogic.gdx.physics.box2d.PolygonShape
;
import
com.badlogic.gdx.physics.box2d.PolygonShape
;
import
com.badlogic.gdx.physics.box2d.World
;
import
com.badlogic.gdx.physics.box2d.World
;
import
com.badlogic.gdx.utils.Array
;
import
com.badlogic.gdx.utils.Array
;
import
com.badlogic.gdx.utils.GdxRuntimeException
;
import
com.mygdx.game.PlatVenture
;
import
com.mygdx.game.PlatVenture
;
import
body.Joyau
;
import
body.Joyau
;
...
@@ -172,7 +175,7 @@ public class Play extends GameState {
...
@@ -172,7 +175,7 @@ public class Play extends GameState {
batch
.
draw
(
res
.
getTexture
(
"idle_001"
),
player
.
getPosition
().
x
-
5
f
/
PPM
,
player
.
getPosition
().
y
-
2
f
/
PPM
,
1
/
10
f
,
1
/
10
f
);
batch
.
draw
(
res
.
getTexture
(
"idle_001"
),
player
.
getPosition
().
x
-
5
f
/
PPM
,
player
.
getPosition
().
y
-
2
f
/
PPM
,
1
/
10
f
,
1
/
10
f
);
batch
.
end
();
batch
.
end
();
//dessine le monde box2d
//dessine le monde box2d
//
b2dr.render(world, b2dCam.combined);
b2dr
.
render
(
world
,
b2dCam
.
combined
);
}
}
@Override
@Override
...
@@ -297,7 +300,11 @@ public class Play extends GameState {
...
@@ -297,7 +300,11 @@ public class Play extends GameState {
}
}
private
void
loadLevel
(
int
current
){
private
void
loadLevel
(
int
current
){
String
path
=
"assets/level_00"
+
current
+
".txt"
;
String
path
=
"level_00"
+
current
+
".txt"
;
if
(
Gdx
.
app
.
getType
()
==
Application
.
ApplicationType
.
Android
)
{
path
=
"assets/level_00"
+
current
+
".txt"
;
}
createWorld
(
path
);
createWorld
(
path
);
}
}
...
@@ -366,21 +373,22 @@ public class Play extends GameState {
...
@@ -366,21 +373,22 @@ public class Play extends GameState {
}
}
private
void
loadTexture
(){
private
void
loadTexture
(){
res
.
loadTexture
(
"assets/Platform_J.png"
,
"platJ"
);
res
.
loadTexture
(
"badlogic.jpg"
,
"plat"
);
res
.
loadTexture
(
"assets/Platform_K.png"
,
"platK"
);
res
.
loadTexture
(
"Platform_J.png"
,
"platJ"
);
res
.
loadTexture
(
"assets/Platform_L.png"
,
"platL"
);
res
.
loadTexture
(
"Platform_K.png"
,
"platK"
);
res
.
loadTexture
(
"assets/Brick_A.png"
,
"brickA"
);
res
.
loadTexture
(
"Platform_L.png"
,
"platL"
);
res
.
loadTexture
(
"assets/Brick_B.png"
,
"brickB"
);
res
.
loadTexture
(
"Brick_A.png"
,
"brickA"
);
res
.
loadTexture
(
"assets/Brick_C.png"
,
"brickC"
);
res
.
loadTexture
(
"Brick_B.png"
,
"brickB"
);
res
.
loadTexture
(
"assets/Brick_D.png"
,
"brickD"
);
res
.
loadTexture
(
"Brick_C.png"
,
"brickC"
);
res
.
loadTexture
(
"assets/Brick_E.png"
,
"brickE"
);
res
.
loadTexture
(
"Brick_D.png"
,
"brickD"
);
res
.
loadTexture
(
"assets/Brick_F.png"
,
"brickF"
);
res
.
loadTexture
(
"Brick_E.png"
,
"brickE"
);
res
.
loadTexture
(
"assets/Brick_G.png"
,
"brickG"
);
res
.
loadTexture
(
"Brick_F.png"
,
"brickF"
);
res
.
loadTexture
(
"assets/Brick_H.png"
,
"brickH"
);
res
.
loadTexture
(
"Brick_G.png"
,
"brickG"
);
res
.
loadTexture
(
"assets/Brick_I.png"
,
"brickI"
);
res
.
loadTexture
(
"Brick_H.png"
,
"brickH"
);
res
.
loadTexture
(
"assets/Exit_Z.png"
,
"exit"
);
res
.
loadTexture
(
"Brick_I.png"
,
"brickI"
);
res
.
loadTexture
(
"assets/Back.png"
,
"back"
);
res
.
loadTexture
(
"Exit_Z.png"
,
"exit"
);
res
.
loadTexture
(
"assets/Idle__000.png"
,
"idle_001"
);
res
.
loadTexture
(
"Back.png"
,
"back"
);
res
.
loadTexture
(
"Idle__000.png"
,
"idle_001"
);
//res.getTexture("platJ");
//res.getTexture("platJ");
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment