Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
ProjetProg2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pa
ProjetProg2
Commits
b60fc960
Commit
b60fc960
authored
Feb 28, 2019
by
pa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Room system - still needs to add map on top of it
parent
fa0d2891
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
160 additions
and
101 deletions
+160
-101
headers/agent.hpp
headers/agent.hpp
+1
-1
headers/game.hpp
headers/game.hpp
+1
-2
headers/player.hpp
headers/player.hpp
+1
-1
headers/room.hpp
headers/room.hpp
+38
-0
headers/sceneNode.hpp
headers/sceneNode.hpp
+1
-1
headers/textureHolder.hpp
headers/textureHolder.hpp
+2
-1
headers/world.hpp
headers/world.hpp
+3
-16
source/agent.cpp
source/agent.cpp
+2
-0
source/alive.cpp
source/alive.cpp
+9
-11
source/ennemy.cpp
source/ennemy.cpp
+2
-2
source/game.cpp
source/game.cpp
+7
-10
source/player.cpp
source/player.cpp
+8
-4
source/room.cpp
source/room.cpp
+59
-0
source/sceneNode.cpp
source/sceneNode.cpp
+0
-1
source/sword.cpp
source/sword.cpp
+9
-3
source/textureHolder.cpp
source/textureHolder.cpp
+10
-1
source/world.cpp
source/world.cpp
+7
-47
No files found.
headers/agent.hpp
View file @
b60fc960
...
...
@@ -10,7 +10,7 @@
class
Agent
:
public
SceneNode
{
public
:
enum
Type
{
qProjectile
,
tProjectile
,
Player
,
PlayerHit
,
Tower
,
Floor
,
qProjectile
,
tProjectile
,
Player
,
PlayerHit
,
Tower
,
Sword_0
,
Sword_1
,
Sword_2
,
Sword_3
,
Sword_4
,
Sword_5
};
Textures
::
ID
toTextureID
(
Type
type
);
...
...
headers/game.hpp
View file @
b60fc960
...
...
@@ -8,10 +8,9 @@ class Game{
public
:
Game
();
void
run
();
void
processEvents
();
void
handlePlayerInput
(
sf
::
Keyboard
::
Key
key
,
bool
isPressed
);
void
update
(
sf
::
Time
deltaTime
);
void
render
();
void
processEvents
();
private
:
sf
::
RenderWindow
mWindow
;
...
...
headers/player.hpp
View file @
b60fc960
...
...
@@ -15,7 +15,7 @@ public :
Player
(
TextureHolder
const
&
Textures
);
void
q_spell
();
void
w_spell
();
void
w_spell
(
int
dir
);
virtual
void
updateCurrent
(
sf
::
Time
dt
);
virtual
void
act
(
sf
::
Time
dt
);
...
...
headers/room.hpp
0 → 100644
View file @
b60fc960
#pragma once
#include "category.hpp"
#include "textureHolder.hpp"
#include "sceneNode.hpp"
#include <SFML/Graphics.hpp>
#include "spriteNode.hpp"
#include "ennemy.hpp"
#include <array>
class
Room
:
public
SceneNode
{
public:
Room
(
TextureHolder
&
textures
,
sf
::
IntRect
&
bounds
);
virtual
void
draw
(
sf
::
RenderTarget
&
target
,
sf
::
RenderStates
states
)
const
;
void
attachPlayer
(
SceneNode
::
Ptr
player
);
SceneNode
::
Ptr
detachPlayer
(
const
SceneNode
&
player
);
private:
void
loadTextures
();
void
buildScene
();
private:
enum
Layer
{
Background
,
Air
,
LayerCount
};
std
::
array
<
SceneNode
*
,
LayerCount
>
mSceneLayers
;
TextureHolder
&
mTextures
;
sf
::
Vector2f
mSpawnPosition
;
sf
::
IntRect
&
mBounds
;
};
headers/sceneNode.hpp
View file @
b60fc960
...
...
@@ -20,7 +20,7 @@ public :
void
stageForRemoval
();
bool
isStageForRemoval
()
const
{
return
isMarkedForRemoval
;}
void
draw
(
sf
::
RenderTarget
&
target
,
sf
::
RenderStates
states
)
const
;
v
irtual
v
oid
draw
(
sf
::
RenderTarget
&
target
,
sf
::
RenderStates
states
)
const
;
virtual
void
drawCurrent
(
sf
::
RenderTarget
&
target
,
sf
::
RenderStates
states
)
const
;
void
update
(
sf
::
Time
dt
);
...
...
headers/textureHolder.hpp
View file @
b60fc960
...
...
@@ -18,7 +18,8 @@ template <typename Ressource, typename Identifier> class RessourceHolder {
public:
void
load
(
Identifier
id
,
const
std
::
string
&
filename
);
const
Ressource
&
get
(
Identifier
id
)
const
;
Ressource
const
&
get
(
Identifier
id
)
const
;
Ressource
&
get
(
Identifier
id
);
private:
...
...
headers/world.hpp
View file @
b60fc960
...
...
@@ -8,7 +8,7 @@
#include "ennemy.hpp"
#include "orbital.hpp"
#include <SFML/Graphics.hpp>
#include "room.hpp"
#include <iostream>
#include <array>
...
...
@@ -21,31 +21,18 @@ public:
void
update
(
sf
::
Time
dt
);
void
draw
();
void
spawnPlayer
(
std
::
unique_ptr
<
Room
>&
room
);
int
getPlayerHP
()
const
;
private:
void
loadTextures
();
void
buildScene
();
void
checkCollision
();
private:
enum
Layer
{
Background
,
Air
,
LayerCount
};
private:
sf
::
RenderWindow
&
mWindow
;
sf
::
View
mWorldView
;
sf
::
IntRect
mWorldBounds
;
TextureHolder
mTextures
;
SceneNode
mSceneGraph
;
std
::
array
<
SceneNode
*
,
LayerCount
>
mSceneLayers
;
sf
::
FloatRect
mWorldBounds
;
sf
::
Vector2f
mSpawnPosition
;
float
mScrollSpeed
;
Player
*
mPlayer
;
};
source/agent.cpp
View file @
b60fc960
...
...
@@ -3,6 +3,8 @@
Textures
::
ID
Agent
::
toTextureID
(
Agent
::
Type
type
){
switch
(
type
){
case
Floor
:
return
Textures
::
ID
::
Floor
;
case
qProjectile
:
return
Textures
::
ID
::
qProjectile
;
case
tProjectile
:
...
...
source/alive.cpp
View file @
b60fc960
...
...
@@ -37,21 +37,19 @@ Agent::Type Alive::typeOfState(){
}
void
Alive
::
hit
(){
if
(
!
mLock
)
--
mHP
;
lock
(
sf
::
milliseconds
(
500.
f
));
if
(
mHP
<=
0
)
stageForRemoval
();
mState
=
HitA
;
mHitCount
=
8
;
mHitTime
=
sf
::
milliseconds
(
150.
f
);
hitAnimation
(
sf
::
seconds
(
0.
f
));
if
(
!
mLock
){
--
mHP
;
lock
(
sf
::
milliseconds
(
500.
f
));
if
(
mHP
<=
0
)
stageForRemoval
();
mState
=
HitA
;
mHitCount
=
14
;
mHitTime
=
sf
::
milliseconds
(
150.
f
);
}
}
void
Alive
::
hitAnimation
(
sf
::
Time
dt
){
std
::
cout
<<
mState
<<
'\n'
;
switch
(
mState
){
case
Normal
:
setType
(
Agent
::
Player
);
break
;
case
Normal
:
break
;
case
HitA
:
case
HitB
:
mHitTime
-=
dt
;
...
...
source/ennemy.cpp
View file @
b60fc960
#include "../headers/ennemy.hpp"
Ennemy
::
Ennemy
(
TextureHolder
const
&
textures
)
:
Alive
(
Agent
::
Tower
,
textures
,
2
),
mIsQ
(
true
),
mIsW
(
true
){
mQCD
=
sf
::
seconds
(
3
.
f
);
mQCD
=
sf
::
seconds
(
2
.
f
);
}
Agent
::
Type
Ennemy
::
typeOfState
(){
...
...
@@ -22,7 +22,7 @@ void Ennemy::q_spell(float sense){
for
(
int
i
=
0
;
i
<
3
;
++
i
){
std
::
unique_ptr
<
Orbital
>
escortR
(
new
Orbital
(
Agent
::
tProjectile
,
getTexHolder
(),
new
HellSpeedPatern
(
positionSetter
,
sense
*
49.
f
,
1.007
f
),
false
));
new
HellSpeedPatern
(
positionSetter
,
sense
*
94.
f
,
1.01
f
),
false
));
escortR
->
setPosition
(
positionSetter
);
attachChild
(
std
::
move
(
escortR
));
positionSetter
=
transform
.
transformPoint
(
positionSetter
);
...
...
source/game.cpp
View file @
b60fc960
#include "../headers/game.hpp"
Game
::
Game
()
:
mWindow
(
sf
::
VideoMode
(
640
,
4
80
),
"Tests"
),
mWorld
(
mWindow
){
Game
::
Game
()
:
mWindow
(
sf
::
VideoMode
(
1920
,
10
80
),
"Tests"
),
mWorld
(
mWindow
){
TimePerFrame
=
sf
::
seconds
(
1.
f
/
60.
f
);
}
...
...
@@ -24,19 +24,10 @@ void Game::processEvents(){
case
sf
::
Event
::
Closed
:
mWindow
.
close
();
break
;
case
sf
::
Event
::
KeyPressed
:
handlePlayerInput
(
event
.
key
.
code
,
true
);
break
;
case
sf
::
Event
::
KeyReleased
:
handlePlayerInput
(
event
.
key
.
code
,
false
);
break
;
}
}
}
void
Game
::
handlePlayerInput
(
sf
::
Keyboard
::
Key
key
,
bool
isPressed
){}
void
Game
::
update
(
sf
::
Time
deltaTime
){
mWorld
.
update
(
deltaTime
);
}
...
...
@@ -44,6 +35,9 @@ void Game::update(sf::Time deltaTime){
void
Game
::
render
(){
mWindow
.
clear
();
mWorld
.
draw
();
// Truc degeulasse pour afficher des HPs
for
(
int
i
=
0
;
i
<
8
;
++
i
){
sf
::
Sprite
sprite
;
sf
::
Texture
tex
;
...
...
@@ -55,6 +49,9 @@ void Game::render(){
sprite
.
setPosition
(
i
*
32.
f
,
0.
f
);
mWindow
.
draw
(
sprite
);
}
// \Truc degeulasse pour afficher les HP
mWindow
.
display
();
}
source/player.cpp
View file @
b60fc960
...
...
@@ -16,7 +16,7 @@ Agent::Type Player::typeOfState(){
Player
::
Player
(
TextureHolder
const
&
textures
)
:
Alive
(
Agent
::
Player
,
textures
,
8
),
mIsQAvailable
(
true
),
mIsWAvailable
(
true
){
mQCD
=
sf
::
seconds
(
8.
f
);
mWCD
=
sf
::
seconds
(
3
.
f
);
mWCD
=
sf
::
seconds
(
1
.
f
);
}
void
Player
::
q_spell
(){
...
...
@@ -35,11 +35,12 @@ void Player::q_spell(){
}
}
void
Player
::
w_spell
(){
void
Player
::
w_spell
(
int
dir
){
if
(
mIsWAvailable
){
mIsWAvailable
=
false
;
std
::
unique_ptr
<
Sword
>
sword
(
new
Sword
(
getTexHolder
()));
sword
->
rotate
(
dir
*
90.
f
);
attachChild
(
std
::
move
(
sword
));
}
}
...
...
@@ -68,6 +69,9 @@ void Player::keyBindings(){
if
(
sf
::
Keyboard
::
isKeyPressed
(
sf
::
Keyboard
::
Up
))
moveUp
();
if
(
sf
::
Keyboard
::
isKeyPressed
(
sf
::
Keyboard
::
Down
))
moveDown
();
if
(
sf
::
Keyboard
::
isKeyPressed
(
sf
::
Keyboard
::
A
))
q_spell
();
if
(
sf
::
Keyboard
::
isKeyPressed
(
sf
::
Keyboard
::
Z
))
w_spell
();
if
(
sf
::
Keyboard
::
isKeyPressed
(
sf
::
Keyboard
::
Space
))
q_spell
();
if
(
sf
::
Keyboard
::
isKeyPressed
(
sf
::
Keyboard
::
Z
))
w_spell
(
3
);
if
(
sf
::
Keyboard
::
isKeyPressed
(
sf
::
Keyboard
::
Q
))
w_spell
(
2
);
if
(
sf
::
Keyboard
::
isKeyPressed
(
sf
::
Keyboard
::
S
))
w_spell
(
1
);
if
(
sf
::
Keyboard
::
isKeyPressed
(
sf
::
Keyboard
::
D
))
w_spell
(
0
);
}
source/room.cpp
0 → 100644
View file @
b60fc960
#include "../headers/room.hpp"
Room
::
Room
(
TextureHolder
&
textures
,
sf
::
IntRect
&
bounds
)
:
mTextures
(
textures
),
mBounds
(
bounds
),
mSpawnPosition
(
bounds
.
width
/
2.
f
,
bounds
.
height
/
2.
f
){
for
(
int
i
=
0
;
i
<
LayerCount
;
++
i
)
mSceneLayers
[
i
]
=
nullptr
;
loadTextures
();
buildScene
();
}
void
Room
::
loadTextures
(){
mTextures
.
load
(
Textures
::
Floor
,
pathOfID
(
Textures
::
Floor
));
mTextures
.
get
(
Textures
::
Floor
).
setRepeated
(
true
);
mTextures
.
load
(
Textures
::
qProjectile
,
pathOfID
(
Textures
::
qProjectile
));
mTextures
.
load
(
Textures
::
tProjectile
,
pathOfID
(
Textures
::
tProjectile
));
mTextures
.
load
(
Textures
::
Tower
,
pathOfID
(
Textures
::
Tower
));
mTextures
.
load
(
Textures
::
Player
,
pathOfID
(
Textures
::
Player
));
mTextures
.
load
(
Textures
::
PlayerHit
,
pathOfID
(
Textures
::
PlayerHit
));
mTextures
.
load
(
Textures
::
Sword_0
,
pathOfID
(
Textures
::
Sword_0
));
mTextures
.
load
(
Textures
::
Sword_1
,
pathOfID
(
Textures
::
Sword_1
));
mTextures
.
load
(
Textures
::
Sword_2
,
pathOfID
(
Textures
::
Sword_2
));
mTextures
.
load
(
Textures
::
Sword_3
,
pathOfID
(
Textures
::
Sword_3
));
mTextures
.
load
(
Textures
::
Sword_4
,
pathOfID
(
Textures
::
Sword_4
));
mTextures
.
load
(
Textures
::
Sword_5
,
pathOfID
(
Textures
::
Sword_5
));
}
void
Room
::
buildScene
(){
for
(
std
::
size_t
i
=
0
;
i
<
LayerCount
;
++
i
){
SceneNode
::
Ptr
layer
(
new
SceneNode
());
mSceneLayers
[
i
]
=
layer
.
get
();
attachChild
(
std
::
move
(
layer
));
}
std
::
unique_ptr
<
SpriteNode
>
background
(
new
SpriteNode
(
Agent
::
Floor
,
mTextures
,
mBounds
));
background
->
setPosition
(
mBounds
.
width
/
2.
f
,
mBounds
.
height
/
2.
f
);
mSceneLayers
[
Background
]
->
attachChild
(
std
::
move
(
background
));
std
::
unique_ptr
<
Ennemy
>
ennemy
(
new
Ennemy
(
mTextures
));
ennemy
->
setPosition
(
mSpawnPosition
);
mSceneLayers
[
Air
]
->
attachChild
(
std
::
move
(
ennemy
));
}
void
Room
::
attachPlayer
(
SceneNode
::
Ptr
player
){
player
->
setPosition
(
mSpawnPosition
);
mSceneLayers
[
Air
]
->
attachChild
(
std
::
move
(
player
));
}
SceneNode
::
Ptr
Room
::
detachPlayer
(
const
SceneNode
&
player
){
return
mSceneLayers
[
Air
]
->
detachChild
(
player
);
}
void
Room
::
draw
(
sf
::
RenderTarget
&
target
,
sf
::
RenderStates
states
)
const
{
states
.
transform
*=
getTransform
();
for
(
std
::
size_t
i
=
0
;
i
<
LayerCount
;
++
i
)
if
(
mSceneLayers
[
i
]
!=
nullptr
)
mSceneLayers
[
i
]
->
draw
(
target
,
states
);
}
source/sceneNode.cpp
View file @
b60fc960
...
...
@@ -41,7 +41,6 @@ void SceneNode::draw(sf::RenderTarget& target, sf::RenderStates states) const{
void
SceneNode
::
drawCurrent
(
sf
::
RenderTarget
&
target
,
sf
::
RenderStates
states
)
const
{}
void
SceneNode
::
update
(
sf
::
Time
dt
){
updateCurrent
(
dt
);
for
(
const
auto
&
child
:
mChildren
)
child
->
update
(
dt
);
...
...
source/sword.cpp
View file @
b60fc960
...
...
@@ -2,7 +2,7 @@
Sword
::
Sword
(
TextureHolder
const
&
mTextures
)
:
Agent
(
Agent
::
Sword_1
,
mTextures
),
mAnimationTime
(
sf
::
milliseconds
(
15
0.
f
)),
mIsIncreasing
(
true
){
:
Agent
(
Agent
::
Sword_1
,
mTextures
),
mAnimationTime
(
sf
::
milliseconds
(
8
0.
f
)),
mIsIncreasing
(
true
){
getSprite
().
setOrigin
(
20.
f
,
20.
f
);
}
...
...
@@ -14,11 +14,17 @@ void Sword::nextType(){
case
Agent
::
Sword_5
:
mIsIncreasing
=
false
;
setType
(
Agent
::
Sword_4
);
mAnimationTime
=
sf
::
milliseconds
(
150.
f
);
break
;
default
:
setType
(
static_cast
<
Agent
::
Type
>
(
static_cast
<
int
>
(
getType
())
+
(
mIsIncreasing
?
1
:
-
1
)));
mAnimationTime
=
sf
::
milliseconds
(
150.
f
);
break
;
}
switch
(
getType
()){
case
Agent
::
Sword_5
:
mAnimationTime
=
sf
::
milliseconds
(
200.
f
);
break
;
default
:
mAnimationTime
=
sf
::
milliseconds
(
40.
f
);
break
;
}
}
...
...
source/textureHolder.cpp
View file @
b60fc960
...
...
@@ -16,7 +16,16 @@ void RessourceHolder<Ressource,Identifier>::load(Identifier id, const std::strin
}
template
<
typename
Ressource
,
typename
Identifier
>
const
Ressource
&
RessourceHolder
<
Ressource
,
Identifier
>::
get
(
Identifier
id
)
const
{
Ressource
&
RessourceHolder
<
Ressource
,
Identifier
>::
get
(
Identifier
id
){
auto
found
=
mRessourceMap
.
find
(
id
);
if
(
found
==
mRessourceMap
.
end
())
throw
std
::
logic_error
(
"TextureHolder::get - Failed to get"
);
return
*
(
found
->
second
);
}
template
<
typename
Ressource
,
typename
Identifier
>
Ressource
const
&
RessourceHolder
<
Ressource
,
Identifier
>::
get
(
Identifier
id
)
const
{
auto
found
=
mRessourceMap
.
find
(
id
);
if
(
found
==
mRessourceMap
.
end
())
throw
std
::
logic_error
(
"TextureHolder::get - Failed to get"
);
...
...
source/world.cpp
View file @
b60fc960
...
...
@@ -4,54 +4,17 @@
World
::
World
(
sf
::
RenderWindow
&
window
)
:
mWindow
(
window
),
mWorldView
(
window
.
getDefaultView
()),
mWorldBounds
(
0.
f
,
0.
f
,
mWorldView
.
getSize
().
x
,
2000.
f
),
mSpawnPosition
(
mWorldView
.
getSize
().
x
/
2.
f
,
mWorldView
.
getSize
().
y
/
2.
f
){
for
(
int
i
=
0
;
i
<
LayerCount
;
++
i
)
mSceneLayers
[
i
]
=
nullptr
;
loadTextures
();
buildScene
();
mWorldBounds
(
0.
f
,
0.
f
,
mWorldView
.
getSize
().
x
,
mWorldView
.
getSize
().
y
){
std
::
unique_ptr
<
Room
>
room
(
new
Room
(
mTextures
,
mWorldBounds
));
spawnPlayer
(
room
);
mSceneGraph
.
attachChild
(
std
::
move
(
room
));
}
void
World
::
loadTextures
(){
mTextures
.
load
(
Textures
::
Floor
,
pathOfID
(
Textures
::
Floor
));
mTextures
.
load
(
Textures
::
qProjectile
,
pathOfID
(
Textures
::
qProjectile
));
mTextures
.
load
(
Textures
::
tProjectile
,
pathOfID
(
Textures
::
tProjectile
));
mTextures
.
load
(
Textures
::
Tower
,
pathOfID
(
Textures
::
Tower
));
mTextures
.
load
(
Textures
::
Player
,
pathOfID
(
Textures
::
Player
));
mTextures
.
load
(
Textures
::
PlayerHit
,
pathOfID
(
Textures
::
PlayerHit
));
mTextures
.
load
(
Textures
::
Sword_0
,
pathOfID
(
Textures
::
Sword_0
));
mTextures
.
load
(
Textures
::
Sword_1
,
pathOfID
(
Textures
::
Sword_1
));
mTextures
.
load
(
Textures
::
Sword_2
,
pathOfID
(
Textures
::
Sword_2
));
mTextures
.
load
(
Textures
::
Sword_3
,
pathOfID
(
Textures
::
Sword_3
));
mTextures
.
load
(
Textures
::
Sword_4
,
pathOfID
(
Textures
::
Sword_4
));
mTextures
.
load
(
Textures
::
Sword_5
,
pathOfID
(
Textures
::
Sword_5
));
}
void
World
::
buildScene
(){
for
(
std
::
size_t
i
=
0
;
i
<
LayerCount
;
++
i
){
SceneNode
::
Ptr
layer
(
new
SceneNode
());
mSceneLayers
[
i
]
=
layer
.
get
();
mSceneGraph
.
attachChild
(
std
::
move
(
layer
));
}
// sf::IntRect textureRect(mWorldBounds);
// std::unique_ptr<SpriteNode> backgroundSprite(new SpriteNode(SpriteNode::Desert,textureRect));
// backgroundSprite->setTexture(mTextures);
// backgroundSprite->setPosition(mWorldBounds.left, mWorldBounds.top);
// mSceneLayers[Background]->attachChild(std::move(backgroundSprite));
void
World
::
spawnPlayer
(
std
::
unique_ptr
<
Room
>&
room
){
std
::
unique_ptr
<
Player
>
leader
(
new
Player
(
mTextures
));
mPlayer
=
leader
.
get
();
mPlayer
->
setPosition
(
mSpawnPosition
/
2.
f
);
mPlayer
->
setVelocity
(
40.
f
,
mScrollSpeed
);
mSceneLayers
[
Air
]
->
attachChild
(
std
::
move
(
leader
));
std
::
unique_ptr
<
Ennemy
>
ennemy
(
new
Ennemy
(
mTextures
));
ennemy
->
setPosition
(
mSpawnPosition
);
ennemy
->
setVelocity
(
40.
f
,
mScrollSpeed
);
mSceneLayers
[
Air
]
->
attachChild
(
std
::
move
(
ennemy
));
room
->
attachPlayer
(
std
::
move
(
leader
));
}
int
World
::
getPlayerHP
()
const
{
...
...
@@ -60,10 +23,7 @@ int World::getPlayerHP() const{
void
World
::
draw
(){
mWindow
.
setView
(
mWorldView
);
for
(
std
::
size_t
i
=
0
;
i
<
LayerCount
;
++
i
)
if
(
mSceneLayers
[
i
]
!=
nullptr
)
mWindow
.
draw
(
*
mSceneLayers
[
i
]);
mWindow
.
draw
(
mSceneGraph
);
}
void
World
::
update
(
sf
::
Time
dt
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment