1
This commit is contained in:
parent
b52ba4ee77
commit
7515adebae
@ -50,13 +50,6 @@ void Bullet::RecalcSelfCollider()
|
||||
self_collider_->rad = gun_meta->i->bullet_rad();
|
||||
}
|
||||
|
||||
#ifdef RAY_DETECTION
|
||||
void Bullet::RayDetection()
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void Bullet::OnHit(std::set<Entity*>& objects)
|
||||
{
|
||||
for (auto& target : objects) {
|
||||
|
@ -31,7 +31,6 @@ class Bullet : public Entity
|
||||
virtual void Initialize() override;
|
||||
virtual void Update(int delta_time) override;
|
||||
void RecalcSelfCollider();
|
||||
void RayDetection();
|
||||
void ClearRayData();
|
||||
|
||||
private:
|
||||
|
@ -2,6 +2,11 @@
|
||||
|
||||
#include "movement.h"
|
||||
|
||||
void MovementComponent::RayDetection()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MovementComponent::GetCollisionObjects(std::set<Entity*>& objects)
|
||||
{
|
||||
|
||||
|
@ -9,6 +9,7 @@ class MovementComponent
|
||||
Vector2D target_point;
|
||||
std::set<Entity*> detection_objects;
|
||||
|
||||
void RayDetection();
|
||||
void GetCollisionObjects(std::set<Entity*>& objects);
|
||||
bool TestCollision();
|
||||
};
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "roommgr.h"
|
||||
#include "app.h"
|
||||
#include "hero.h"
|
||||
#include "movement.h"
|
||||
|
||||
const int ROOM_MAX_PLAYER_NUM = 50;
|
||||
|
||||
@ -605,7 +606,7 @@ void Room::CreateBullet(Human* hum, Weapon* weapon,
|
||||
AddObjectLater(bullet);
|
||||
grid_service.AddBullet(bullet);
|
||||
#ifdef RAY_DETECTION
|
||||
bullet->RayDetection();
|
||||
bullet->movement->RayDetection();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user