Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cpp-project
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
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Maul
cpp-project
Commits
1ff39386
Commit
1ff39386
authored
6 months ago
by
Max Cherris
Browse files
Options
Downloads
Patches
Plain Diff
Commit changes
parent
c10c0cc1
Branches
Branches containing commit
No related tags found
2 merge requests
!34
Building features
,
!29
Merge main into box2d to implement physics
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/game/Building.hpp
+0
-6
0 additions, 6 deletions
src/game/Building.hpp
src/game/Level.cpp
+2
-1
2 additions, 1 deletion
src/game/Level.cpp
with
2 additions
and
7 deletions
src/game/Building.hpp
+
0
−
6
View file @
1ff39386
...
...
@@ -39,12 +39,6 @@ class Building
*/
bool
check_money
(
int
price
);
/*
When the building is selected, the player should have the ability to recruit a selection of
units They should be displayed by the UI On_click();
*/
void
recruit_unit
();
/**
If the building is clicked, it shows information to the player, here it will be a list of
all available units
...
...
This diff is collapsed.
Click to expand it.
src/game/Level.cpp
+
2
−
1
View file @
1ff39386
...
...
@@ -600,7 +600,8 @@ void Level::handleSelectingEvents(Engine& engine, SDL_Event& event)
}
else
{
if
(
m_buildings
.
at
(
m_selectedBuilding
).
getBuildingId
()
==
BuildingId
::
CITY
)
{
BuildingId
b_id
=
m_buildings
.
at
(
m_selectedBuilding
).
getBuildingId
();
if
(
b_id
==
BuildingId
::
CITY
||
b_id
==
BuildingId
::
HEADQUARTER
)
{
m_contextMenu
.
setOptions
({
"Info"
,
"Wait"
});
}
else
{
m_contextMenu
.
setOptions
({
"Train"
,
"Info"
,
"Wait"
});
...
...
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