-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PlacedWeapons can be activated when player is nearby
- Loading branch information
Showing
16 changed files
with
199 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// | ||
// Created by jul3x on 02.03.2022. | ||
// | ||
|
||
#ifndef RAG3_COMMON_INCLUDE_COMMON_ACTIVATIONAREA_H | ||
#define RAG3_COMMON_INCLUDE_COMMON_ACTIVATIONAREA_H | ||
|
||
#include <R3E/objects/AbstractPhysicalObject.h> | ||
|
||
|
||
using namespace r3e; | ||
|
||
class PlacedWeapon; | ||
|
||
class ActivationArea : public HoveringObject { | ||
public: | ||
ActivationArea(PlacedWeapon* father, float r) : | ||
father_(father), | ||
HoveringObject({}, {}, {r, r}, collision::Circle(r), nullptr, 0, 0, 0.0f, 0.0f), | ||
is_active_(false) | ||
{ | ||
|
||
} | ||
|
||
PlacedWeapon* getFather() const | ||
{ | ||
return father_; | ||
} | ||
|
||
bool isActive() const | ||
{ | ||
return is_active_; | ||
} | ||
|
||
void setActive(bool active) | ||
{ | ||
is_active_ = active; | ||
} | ||
|
||
private: | ||
void draw(sf::RenderTarget& target, sf::RenderStates states) const override | ||
{ | ||
|
||
} | ||
|
||
PlacedWeapon* father_; | ||
bool is_active_; | ||
|
||
}; | ||
|
||
#endif //RAG3_COMMON_INCLUDE_COMMON_ACTIVATIONAREA_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,4 @@ vector area_offset=(-10.0, -20.0) | |
float range=30.0 | ||
float activate_time_elapsed=0.32 | ||
|
||
int z_index=1 | ||
int z_index=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.